Skip to content

Instantly share code, notes, and snippets.

@oct2pus
Last active November 5, 2019 06:00
Show Gist options
  • Save oct2pus/353afa7ad74696ea4a7bfb5c9230fd02 to your computer and use it in GitHub Desktop.
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.
#!/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
#!/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
@oct2pus
Copy link
Author

oct2pus commented Oct 26, 2019

updated for homestuck...2!!

peggle2

@oct2pus
Copy link
Author

oct2pus commented Nov 5, 2019

added a markov script to run simultaneously.

requires generator and a trained model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment