Mastodon image dump bot.

Lerk a238d580f9 '' ändern 5 months ago
.gitignore 287514a5f5 initial 1 year ago 82889a2655 add link 5 months ago
config-sample.json b67d55424b fix bug 1 year ago a238d580f9 '' ändern 5 months ago
requirements.txt 6a72dd25bf fix bug 1 year ago


Mastodon bot that posts random images from a folder.


  1. Create a memes directory inside this folder and put your images into it
  2. Copy and edit config-sample.json to config.json
  3. Run pip install -r requirements.txt to install dependencies
  4. Run python ./ once to generate credentials
  5. Run python ./ again (when successfully registered) to post

Since the path to the memes directory is relative, you need to be inside the folder of this for the bot to work.


Here is a list of the most important configuration options:

key default description
cw null Sets the content warning of the post, null for no cw
mark_sensitive true Decides whether or not the media should be marked as sensitive
site "" The Mastodon instance of the Bot
dir ./memes Path to the directory where random files to post will be chosen from
repost_threshold 10 Number of retries when a randomly selected file was already posted


Since posting only consists of running with a valid (registered) config, there are multiple ways of scheduling posts. Before doing scheduling make sure to generate the client credentials by running once in an interactive terminal.

Cron (Linux)

The simplest way to do this is running crontab -e as the user the bot should run as and adding a line like:

*/30 * * * * cd /path/to/memedump/ && /path/to/python 

This would result in one post every 30 minutes.