Mastodon Feed: Post

Mastodon Feed

jsonstein@masto.deoan.org ("Jeff Sonstein") wrote:

for the terminally curious:

----- snip -----
jeffs@Ultron ~ % cat bin/historyLoop.sh
#!/bin/sh

THIS_RESPONSE=`/opt/homebrew/bin/toot post "[BEGIN TODAY IN HISTORY RUN]" | cut -d/ -f5`
/bin/sleep 1
cat /usr/share/calendar/cal* | grep `date +"%m/%d"` | cut -f 2 | sed s/\"/\'/g | while read line ; do
THIS_RESPONSE=`/opt/homebrew/bin/toot post -v unlisted -s -p 'Today in History' -r $THIS_RESPONSE "Today in History: $line" | cut -d/ -f5`
/bin/sleep 1
done
THIS_RESPONSE=`/opt/homebrew/bin/toot post -v unlisted -s -p 'Today in History' -r $THIS_RESPONSE "[END TODAY IN HISTORY RUN]"`
jeffs@Ultron ~ %