Simple ebooks-style bot for mastodon.py
Inspired by original work by Jess: https://github.com/Jess3Jane/mastodon-ebooks
- Scrapes only new toots, not entire list of statuses
- Separates corpus by account, making a multi-account ebooks easier to manage
- Does not require Heroku or Ruby
- "Smart" replies
- Cronjob friendly
- Create a Mastodon account to be the ebooks bot
- Follow the account(s) to be used as source material from bot
- You can use a script like this to generate user secrets to be used by the ebooks script
- Scrape the users by running:
./mastodon-ebooks.py -s
- Verify the markov works by running locally to console:
./mastodon-ebooks.py -p
- Toot a markovified status!
./mastodon-ebooks.py -t
Alternatively, you can loop indefinitely (reply every 10 seconds, toot and scrape toots every 30 minutes) ./mastodon-ebooks.py -l
Optionally, you can also run ./mastodon-ebooks.py -r
regularly to check on notifications and reply to mentions.
I took the base login.py and edited it to implement the api base url inside usercred.secret
so it's now easier to setup the bot without having to edit the base url from the mastodon-ebooks.py
script.