This project has been archived by its maintainers, and is no longer receiving any updates.
python-twootfeed
generate a rss feed from parsed Twitter or Mastodon search and Mastodon favorites
The RSS feed displays only the original tweets (not the retweets) and toots, with:
- links to :
- the tweet on Twitter or toot on Mastodon
- hashtags
- usernames
- URLs
- images
- source
- location (only for Twitter)
- numbers of retweets and likes for tweets and boosts and favourites for toots
(see examples below).
Requirements
- Python 3.6+
- API keys Twitter and/or Mastodon
Installation and configuration
- Install from pip
$ pip install twootfeed
- Initialize the configuration file
$ twootfeed_init
-
Fill in fields for the client(s) you will use in '~/.config/twootfeed/config.yml' :
- for Twitter : see https://apps.twitter.com
copy/paste the Twitter API key values in config.yml file ('consumerKey' and 'consumerSecret') - for Mastodon : see Python wrapper for the Mastodon API
use the included script which will register your app and prompt you to log in, creating the credential files for you.
$ twootfeed_create_mastodon_cliUpdate the feed and app parameters.
- for Twitter : see https://apps.twitter.com
-
The files location can be changed with the following environment variables:
| variable | description | app default value |
|---|---|---|
TWOOTFEED_CONFIG_DIR |
configuration and credentials files directory | '~/.config/twootfeed/' |
TWOOTFEED_CONFIG_FILE |
config file full path | config dir + 'config.yml' => with default value: '~/.config/twootfeed/config.yml' |
TWOOTFEED_LOG |
application log file | no default value (log printed on the console) |
- Start the app
$ twootfeed
Usage
The RSS feeds are available on these urls:
- for Twitter: http://localhost:8080/ or http://localhost:8080/tweets/
- for Mastodon:
- search:
- keyword as a hashtag: http://localhost:8080/toots/ (without the leading #)
- query: http://localhost:8080/toot_search/
- connected user favourites: http://localhost:8080/toot_favorites
- search:
Examples
Search on Twitter
Results in RSS Feed:
Display on FreshRSS, a great free self-hosted aggregator (https://github.com/FreshRSS/FreshRSS):
Search on Mastodon
Results in RSS Feed:
Display on FreshRSS:
Contribute
see Quick start for developers
Contributors
Thanks to:
- georgedorn for adding:
- rss feed generation with authenticated user's favorites
- script to register the app and generate credentials for Mastodon
Metadata
Release files for twootfeed 0.6.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| twootfeed-0.6.4.tar.gz | 11.3 kB | Without provenance | Details for twootfeed-0.6.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| twootfeed-0.6.4-py3-none-any.whl | Python 3 | none | any | Details for twootfeed-0.6.4-py3-none-any.whl |
Total release size: 24.5 kB
Release files / twootfeed-0.6.4.tar.gz
| Download URL | twootfeed-0.6.4.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7543c60ce8413f69bbd39498b6da6da5ab32411a1bb9c3f00f69f3a2a6a24d6
|
|
BLAKE2b-256 checksum How to use checksums |
78437518fb1deb7cf05e3539451ceda75dc3e65276cbfbe8f413979cf15b3877
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Release files / twootfeed-0.6.4-py3-none-any.whl
| Download URL | twootfeed-0.6.4-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aae09d9cc7a4c8a53e6789c34bd743e4f9e0d1a192572b987a0fc17b33745699
|
|
BLAKE2b-256 checksum How to use checksums |
1af31d6a6176c2424330e8400a24e4a8827f66b276d0c6c76f5ef535da535261
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Security for twootfeed 0.6.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.