add mega, begin on jbmasto

This commit is contained in:
Octopus Octopus 2023-12-25 14:10:23 -06:00
parent 4ba624b084
commit b670a72c29
6 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,4 @@
FROM debian:stable-slim
RUN apt-get update && apt-get install -y fish toot
ADD ./jbmasto/* /root
CMD ./root/markov.fish

Binary file not shown.

View File

@ -0,0 +1 @@
story/394

View File

@ -0,0 +1,8 @@
#!/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

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,18 @@
#!/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