||2 years ago|
|.gitignore||3 years ago|
|README.md||2 years ago|
|config-sample.json||3 years ago|
|main.py||2 years ago|
|requirements.txt||3 years ago|
Mastodon bot that posts random images from a folder.
- Create a
memesdirectory inside this folder and put your images into it
- Copy and edit
pip install -r requirements.txtto install dependencies
python ./main.pyonce to generate credentials
python ./main.pyagain (when successfully registered) to post
Since the path to the
memes directory is relative, you need to be inside the folder of this
README.md for the bot to work.
Here is a list of the most important configuration options:
||Sets the content warning of the post,
||Decides whether or not the media should be marked as sensitive|
||The Mastodon instance of the Bot|
||Path to the directory where random files to post will be chosen from|
||Number of retries when a randomly selected file was already posted|
Since posting only consists of running
main.py with a valid (registered) config, there are multiple ways of scheduling posts.
Before doing scheduling make sure to generate the client credentials by running
main.py once in an interactive terminal.
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 main.py
This would result in one post every 30 minutes.