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) }