No project description provided
Project description
telegram-to-rss
Generate an RSS feed from your Telegram chats. You digital minimalism friend.
How to get the most of it
Digital minimalism is a strategy to help people optimize their use of technology and keep from being overwhelmed by it.
- Create a separate Telegram account to subscribe to various channels available only as Telegram feeds (yep, they exist!)
- Convert all of them to RSS feeds using this app
- Be in power of your information consumption with a single place to get it - your RSS reader!
Quick start
Docker
Coming soon
Bare bone Python
pip install telegram-to-rss
- Get
api_id
anapi_hash
at https://my.telegram.org - Run in your terminal
TG_API_ID=api_id TG_API_HASH=api_hash BASE_URL=server_url python telegram_to_rss
- Example:
TG_API_ID=00000000 TG_API_HASH=7w8sdsd3g334r333refdwd3qqrwe BASE_URL=example.myserver.com python telegram_to_rss
- Example:
- If you have 2FA enabled on your Telegram account set
TG_PASSWORD
with your account password as well:TG_API_ID=api_id TG_API_HASH=api_hash TG_PASSWORD=your_password BASE_URL=server_url python telegram_to_rss
- Go to
http://127.0.0.1:5000
- Scan the QR code with your Telegram app
- Give it a few seconds to log in
- Get redirected to a page with a list of all your chats available as RSS feeds.
- If the list is incomplete, give it a few minutes on the first start to generate the RSS feeds.
- Subsequent updated should be much faster!
Configuration
Available environment variables (* marks required ones):
- *
TG_API_ID
- api_id from https://my.telegram.org - *
TG_API_HASH
- api_hash from https://my.telegram.org - *
BASE_URL
- address of your server that hosts this app, used in RSS feeds to correctly set image addresses TG_PASSWORD
- your telegram password, required if 2fa is enabled on the accountBIND
-host:port
to bind to on the server. Default:127.0.0.1:5000
LOGLEVEL
- log level for the app (supported values). Default:INFO
DATA_DIR
- path to store the database, RSS feeds and other static files. Default:user_data_dir
from platformdirsFEED_SIZE
- size of the RSS feed. When your RSS feed grows larger than the limit, older entries are going to be discarded. Default: 100.POLL_BATCH_SIZE
- how many messages we fetch from Telegram everyUPDATE_INTERVAL
seconds. Also a number of items we fetch for any new feed. Might behave weirdly with the values over 100. Could be improved by iterating through Telegram API calls in multiple batches, but I never got to it. You know, 20% effort - 80% result :palm_tree: :sunny: :tropical_drink: Default value: 20.UPDATE_INTERVAL
- how often the app should fetch new messages from Telegram and regenerate RSS feeds (in seconds). Default: 3600.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
telegram_to_rss-0.1.0.tar.gz
(11.2 kB
view hashes)
Built Distribution
Close
Hashes for telegram_to_rss-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5a1fda17058d10a2226364dce1e3acc035c635dc7ecd8ad00228c963f6a6035 |
|
MD5 | b546e6fddd349fa24a74f4a0e0b81520 |
|
BLAKE2b-256 | 94c084cd6d39a5e48f6b20eb7ccce73dc7cdf9e5a70d80f19983481c82aa9f5b |