Andreas Demmelbauer 6ca8782ac0 | před 6 roky | |
---|---|---|
.gitignore | před 6 roky | |
LICENSE | před 7 roky | |
README.md | před 6 roky | |
config-example.json | před 6 roky | |
cron-example.sh | před 6 roky | |
requirements.txt | před 6 roky | |
tootbot.py | před 6 roky |
A small python 3.x script to replicate tweets and posts from soup.io on a mastodon account. It’s based on TootBot: https://github.com/cquest/tootbot
The script only need mastodon login/pass to post toots.
For Twitter, it gets the tweets from RSS available at http://twitrss.me, then does some cleanup on the content:
For Soup, it uses the official RSS feed (e.g. https://metalab.soup.io/rss), then does some cleanup on the content:
A sqlite database is used to keep track of items than have been tooted.
This script ist used by metalab: https://chaos.social/@metalab
You may want to run it in a virtualenv:
virtualenv -p python3 ~/.virtualenvs/tootbot-spicy
source ~/.virtualenvs/tootbot-spicy/bin/activate
(tootbot)
in the prompt is indicating which virtualenv you are currently using.cd tootbot-spicy
pip3 install -r requirements.txt
cp config-example.json config.json
.config.json
cp cron-example.sh cron.sh
.cron.sh
cron.sh
: crontab -e
deactivate
The script is simply called by a cron job and can run on any server (does not have to be on the mastodon instance server).