Dryusdan e2c9074920 | ||
---|---|---|
.env.sample | ||
.gitignore | ||
LICENSE | ||
README.md | ||
bot.py | ||
requirements.dev.txt | ||
requirements.txt |
README.md
masto-cron-image
Bot who send specified image (usefull for cron, like this name) and publish it on Mastodon or Pleroma (tested).
Copy the file .env.sample
to .env
and fill it with developers credential and your mastodon instance URL without https.
You can also register your bot on a Mastodon instance and get the needed codes with the help of the script register-app.
Install the dependencies
pip3 install -r requirements.txt
Use it
usage: bot.py [-h] -i IMG [-s] -d DESCRIPTION [-t TEXT] [--visibility {public,unlisted,private,direct}] [--spoiler SPOILER]
optional arguments:
-h, --help show this help message and exit
-i IMG, --img IMG Picture path
-s, --sensitive Make post as sensitive (default false)
-d DESCRIPTION, --description DESCRIPTION
Description of this picture (required)
-t TEXT, --text TEXT Text in toot
--visibility {public,unlisted,private,direct}
Toot visibility (default public)
--spoiler SPOILER Spoiler text when sensitive is true
--img
This argument requires the actual path of your image.
--description
add an alt description on image.
--text
add a text in your toot.
--visibility
default is public. This argument is usefull if you would change the privacy of your toot.
--sensitive
Default is false. This parameter hide your image behind a CW.
--spoiler
Add a spoiler text when sensitive is true.