limiter | ||
secrets | ||
utils | ||
.gitignore | ||
activity.log | ||
bot.py | ||
config.sample.txt | ||
LICENSE | ||
README.md | ||
requirements.txt | ||
TootHTMLParser.py |
masto-image-bot
Un bot qui récupère une image random en local et la publie
Copiez le fichier config.sample.txt
en config.txt
, ajoutez le chemin de votre dossier image.
Remplissez le fichier secrets/secrets.txt
et remplissez le avec les code que vous trouverez dans l'onglet développeur de votre compte Mastodon.
Configure it
Copy config.sample.txt
to config.txt
and replace data by your data
Use it
usage: bot.py [-h] [-i] [-s]
Choose between image or streaming
optional arguments:
-h, --help show this help message and exit
-i, --img post image
-s, --stream stream user profile
--img
option send image.
--stream
option send image on mention
Create a systemd service
On /etc/systemd/system/bot.service
copy paste code behind
[Unit]
Description=Image bot Mastodon
Documentation=https://git.drycat.fr/Dryusdan/masto-random-local-image-bot/src/branch/master
Requires=network.target
After=network.target
[Service]
Type=simple
User=masto-bot
TimeoutSec=15
WorkingDirectory=/home/masto-bot/
ExecStart=/usr/bin/python3 bot.py --stream