Conversation
Notices
-
Embed this notice
Critical (critical@blob.cat)'s status on Saturday, 11-Nov-2023 08:22:01 JST Critical
@mametsuko how do I make a bot like your brot bot? :ablobcatbongo: - iced depresso likes this.
-
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Saturday, 11-Nov-2023 08:22:53 JST iced depresso
@critical @mametsuko one cheap way is toot-cli, a shell script and cron. -
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Saturday, 11-Nov-2023 09:12:10 JST iced depresso
@critical @ryan @mametsuko :blobcatadorable: what
i just have sort pluck a random file from a folder, upload it and move it to a spent folder.
```
#!/usr/bin/fish
cd /home/icedquinn/scripts/posts/queue
set post (ls -1 | shuf | head -n1)
if test ! -n "$post"
echo "Nothing to post!"
exit
end
#curl -H "Title: Scheduled post sending" 192.168.1.133/stuff -d @"$post"
toot post < "$post"
and mv "$post" "../spent/$post"
and echo "Posted $post"
``` -
Embed this notice
Critical (critical@blob.cat)'s status on Saturday, 11-Nov-2023 09:12:12 JST Critical
@ryan @icedquinn @mametsuko
So I just make a dictionary of the words from all my posts, using 2 adjacent words as keys and the third word in the sequence as the value. Then I just let it randomly choose the value for the given key in the dictionary (since there will be more than 1 value for most keys).
And that's it? -
Embed this notice
𝕾𝖎𝖗 𝕽𝖞𝖆𝖓 𝕿𝖍𝖔𝖒𝖆𝖘 (ryan@rebased.io)'s status on Saturday, 11-Nov-2023 09:12:13 JST 𝕾𝖎𝖗 𝕽𝖞𝖆𝖓 𝕿𝖍𝖔𝖒𝖆𝖘
That’s how I would do it, since I’m a bash guy
-
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Saturday, 11-Nov-2023 09:18:34 JST iced depresso
@critical @mametsuko @ryan oh you mean like a markov chain bot.
yeah. :blobcatwoah: okay that's more effort yeah. -
Embed this notice
iced depresso (icedquinn@blob.cat)'s status on Saturday, 11-Nov-2023 09:21:20 JST iced depresso
@critical @mametsuko @ryan simple markov models are a big pool of states and each state can transition to any other state with a % probability.
so for each word in each post you track the current word, the one after it, and count how many times you did "foo -> bar", then rack up these counts for each transition, and then when done you go over the transitions and replace the counts with a % based on how many counts that transition got compared to all others. one of these states is also a terminator.
so you pick a random symbol to start at, roll a die, pick a transition from there, output the next word, repeat until done.
this assumes you don't finagle a tool that does it for you. i just explained the theory of the models :drgn_science: