You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.8 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # TootBot Spicy Edition
  2. A small python 3.x script to replicate tweets and posts from soup.io on a mastodon account.
  3. It's based on TootBot: https://github.com/cquest/tootbot
  4. The script only need mastodon login/pass to post toots.
  5. For Twitter, it gets the tweets from RSS available at http://twitrss.me, then does some cleanup on the content:
  6. - twitter tracking links (t.co) are dereferenced
  7. - twitter hosted pictures are retrieved and uploaded to mastodon
  8. For Soup, it uses the official RSS feed (e.g. https://metalab.soup.io/rss), then does some cleanup on the content:
  9. - checks if source is twitter and checks for duplicates
  10. - removes html stuff
  11. - looks for one picture in source link or in soup post and uploads it to mastodon
  12. - adds source url (if no source is specified, soup post is source url)
  13. A sqlite database is used to keep track of items than have been tooted.
  14. This script ist used by metalab: https://chaos.social/@metalab
  15. ## Installation
  16. You may want to run it in a virtualenv:
  17. * Clone this repo with git.
  18. * Download an install virtualenv from the repository and package manager of your favor.
  19. * Create virtualenv: `virtualenv -p python3 ~/.virtualenvs/tootbot-spicy`
  20. * Activate your new virtualenv: `source ~/.virtualenvs/tootbot-spicy/bin/activate`
  21. * The `(tootbot)` in the prompt is indicating which virtualenv you are currently using.
  22. * switch into the projects directory: `cd tootbot-spicy`
  23. * Install requirements: `pip3 install -r requirements.txt`
  24. * copy the config-example: `cp config-example.json config.json`.
  25. * edit `config.json`
  26. * copy the cron-example: `cp cron-example.sh cron.sh`.
  27. * edit `cron.sh`
  28. * add cronjob for `cron.sh`: `crontab -e`
  29. * if you want to quit virtualenv environment, just type `deactivate`
  30. 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).