LOLSpam Returns as a Super-Simple Mastodon Bot

Back when I was comparing social media archives, I considered resurrecting my old LOLspam project as a Mastodon bot. I never quite got around to it, partly because I was able to do most of what I wanted to automate using IFTTT, so I stopped investigating that last 5%.

Last night, I threw together a quick and dirty bot to post a random item from a text file in about 20 minutes.

Then I spent three hours going through the Twitter archive for @LOL_Spam, pulling out jokes that are too dated or cringeworthy. (I hope I didn’t miss any. It was midnight by the time I finished, and I was really tired!)

This morning I modified the script to take a second file as a queue for new items.

  • I can add new items to the queue file as I find them.
  • It’ll post from the queue on a schedule (using cron).
  • When it uses up the queue, it returns to posting random posts from the archive.

If you’re interested in funny/odd spam subjects (and you’re OK with swearing and occasional lewdness), check out @LOLspam@BotsIn.Space. You can follow from any Mastodon or other Fediverse account.

The script itself is called fedbotrandom. I wrote it in Perl, using text files, so I could just put it in cron on any *nix box instead of worrying about language/database support or installing a runtime or DB engine. I’ve made it really simple on purpose, and while I do plan on writing some better error handling when I have time, It’s already more complex than I wanted it to be!

You can find me on Mastodon at @KelsonV@Wandering.shop.

in View Kelson Vibber's profile on LinkedIn

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.