Last active
November 5, 2019 06:00
-
-
Save oct2pus/353afa7ad74696ea4a7bfb5c9230fd02 to your computer and use it in GitHub Desktop.
simple script fish homestuck update checker for mastodong. You have to login seperately prior to this working.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/fish | |
# requires toot, a trained model.json, and generator | |
# (found @ github.com/oct2pus/jadebot/markov/generator) | |
while true | |
toot post (./generator) | |
sleep 3600 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/fish | |
set parturl (curl -s https://upd8.ninja/latestupd8.json | jq -r ".parturl") | |
echo $parturl > ./latest.txt | |
while true | |
set parturl (curl -s https://upd8.ninja/latestupd8.json | jq -r ".parturl") | |
if test ! -z $parturl | |
and [ (echo $parturl) != (cat latest.txt) ] | |
set title (curl -s https://upd8.ninja/latestupd8.json | jq -r ".title") | |
set pages (curl -s https://upd8.ninja/latestupd8.json | jq -r ".pages") | |
printf "New #homestuck update!\nTitle: %s\nPages: %s\nLink: https://homestuck2.com/%s" $title $pages $parturl | toot post | |
echo $parturl > ./latest.txt | |
end | |
sleep 10 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated for homestuck...2!!