From ee95aa89bd5c291d0a62217a981628e6aa796cc9 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 4 Apr 2024 20:22:36 +0200 Subject: [PATCH] Remove chart link and cron.sh I think it was more annoying than interesting to look at. Also, it didn't seem to be worth the maintenance of the cronjob etc. --- cron.sh | 10 ---------- sn.go | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 cron.sh diff --git a/cron.sh b/cron.sh deleted file mode 100644 index 6055043..0000000 --- a/cron.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -xe - -cd /home/ekzyis/hnbot -sqlite3 hnbot.sqlite3 < hacker_news.csv.sql -venv/bin/python plot.py -mv hn_*.png plots/ -rsync plots/* vps:/var/www/files/public/hn/ - diff --git a/sn.go b/sn.go index 4a226e6..386410f 100644 --- a/sn.go +++ b/sn.go @@ -94,7 +94,7 @@ func PostStoryToStackerNews(story *Story, options PostStoryOptions) (int, error) humanize.Time(time.Unix(int64(story.Time), 0)), HackerNewsItemLink(story.ID), story.Score, story.Descendants, - ) + fmt.Sprintf("\n\nhttps://files.ekzyis.com/public/hn/hn_%d.png", story.ID) + ) if _, err := sn.CreateComment(parentId, comment); err != nil { return -1, fmt.Errorf("error posting comment :%w", err) }