From b3417ce55ac9a423c3f6ae9405a4116ac6b1cdbb Mon Sep 17 00:00:00 2001 From: Stefan Schlott Date: Fri, 26 Aug 2022 16:28:04 +0200 Subject: [PATCH] Add mastodon notifications, make location configurable --- scripts/send-reminder-tweets.sh | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/send-reminder-tweets.sh b/scripts/send-reminder-tweets.sh index 144a1ab0..5f002c30 100755 --- a/scripts/send-reminder-tweets.sh +++ b/scripts/send-reminder-tweets.sh @@ -1,14 +1,28 @@ #!/bin/bash +WEBSITE_DIR=${WEBSITE_DIR:-output} +TOOT=${TOOT:-/usr/local/bin/toot} + cd `dirname $0`/.. -cat output/cccs.ical | scripts/tweet-reminders.rb 0 "Heute:" | while read LINE ; do +cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 0 "Heute:" | while read LINE ; do bundle exec t update "$LINE" done -cat output/cccs.ical | scripts/tweet-reminders.rb 1 "Morgen:" | while read LINE ; do +cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 1 "Morgen:" | while read LINE ; do bundle exec t update "$LINE" done -cat output/cccs.ical | scripts/tweet-reminders.rb 7 "In einer Woche:" | while read LINE ; do +cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 7 "In einer Woche:" | while read LINE ; do bundle exec t update "$LINE" done +cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 0 "Heute:" 500 | while read LINE ; do + $TOOT "$LINE" +done +cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 1 "Morgen:" 500 | while read LINE ; do + $TOOT "$LINE" +done +cat "$WEBSITE_DIR/cccs.ical" | scripts/tweet-reminders.rb 7 "In einer Woche:" 500 | while read LINE ; do + $TOOT "$LINE" +done + +