what's all this then
I've got a mastodon bot running at @AbsurdistAscensions@www.librepunk.club. Originally it ran on botsin.space starting in November 2021, but in February 2023 I shut that version down because the way it worked was a pain (it just mashed random words together and I had to manually review every combo). More recently (November 2024) I retooled it to use actual word lists so it can be fully automated.
As for why this bot exists at all, the idea appears to have come out of nowhere. It hasn't stopped being funny to me though
the code
#!/usr/bin/env bash
while true; do
date # for monitoring purposes
words="$(shuf -n 1 adjectives.txt) $(shuf -n 1 nouns.txt)" # generate a two-word phrase
phrase="$(shuf -n 1 finally.txt)" # get a random phrase to put the words into
phrase="${phrase//XYZ/$words}" # put the words into the phrase
phrase="${phrase//ABC/$(< last_words.txt)}" # if it's a phrase that uses 2 sets, use the last set
echo "$words" > last_words.txt # make current word set available as a 2nd set
echo "$phrase" # for monitoring purposes
~/.local/bin/toot post --using AbsurdistAscensions@www.librepunk.club -v unlisted "$phrase" # post the dang thing
sleep 5h
done
What is two is adjectives.txt and nouns.txt
I ripped them off from here and here. The lists are modified somewhat – all words are now capitalized, and I tried to remove words that could potentially create offensive or distasteful posts. (Curation is an ongoing process though)
What is finally.txt
It's a list of phrases that the bot can use, you can read it here.