Go to file
Émy OniriCorpe 1c048adfb2 posts in private & with CW 2022-05-15 01:14:52 +02:00
.gitignore Initial commit 2018-02-19 23:10:42 -03:00
LICENSE Initial commit 2018-02-20 02:10:07 +00:00
README.md add ananas credit 2018-02-24 05:28:38 -03:00
ananaswrapper.py reworked replies 2018-09-02 15:36:46 +02:00
config.cfg-sample ananas wrapper 2018-02-24 08:08:55 +00:00
mastodon-ebooks.py posts in private & with CW 2022-05-15 01:14:52 +02:00
requirements.txt Initial commit 2018-02-20 02:10:07 +00:00

README.md

mastodon-ebooks.py

Simple ebooks-style bot for mastodon.py

Inspired by original work by Jess: https://github.com/Jess3Jane/mastodon-ebooks

Original ananas solution by Noëlle: https://github.com/joyeusenoelle/ananas-ebooks

Improvements over other ebooks bots

  • 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
  • Ananas friendly

Usage

  1. Create a Mastodon account to be the ebooks bot
  2. Follow the account(s) to be used as source material from bot
  3. You can use a script like this to generate user secrets to be used by the ebooks script
  4. Scrape the users by running: ./mastodon-ebooks.py -s
  5. Verify the markov works by running locally to console: ./mastodon-ebooks.py -p
  6. Toot a markovified status! ./mastodon-ebooks.py -t

You can now set scraping and tooting to run periodically with cronjobs.

Optionally, you can also run ./mastodon-ebooks.py -r regularly to check on notifications and reply to mentions.

The Ananas Way

  1. Create a Mastodon account to be the ebooks bot
  2. Copy config.cfg-sample to config.cfg
    • Advanced users: You'll probably already have a config and secret keys for the bot. Just set it up as long as your config file can find the ananaswrapper.ebooksBot class.
  3. Run ananas --interactive config.cfg and input the information for your bot account

That's it! The ananas wrapper is set to scrape daily, toot every 30 minutes and reply to mentions. You can find more info at the ananas repo