* Helpful Jew - RSS Telegram bot 1) Introduction 2) How to use it? 3) How to host it? 4) How it works? 1) Introduction Helpful Jew is a Telegram bot written in Python. Its purpose is to follow RSS feeds and notify you, when there's a new entry. Great to follow: - News - Blogs - Channels on Invidious - Podcasts - Basically any valid RSS feed It uses the following libraries: - feedparser - telebot (pyTelegramBotAPI) - threading - time - json The bot can be added to a group, or used in private. Simply add the bot to the group or message it. @helpfuljew_bot 2) How to use it? The most important is to initialise the bot. You can initialise it in two ways: a) By adding it to a group. b) By writing a private message to it. Once initialised, the bot is ready. The following commands are available (TO EVERYONE!!!*): /list lists all the RSS feeds that you follow /follow [url] Adds an RSS to the list and starts following it. /remove [url] Removes an RSS from the list /myid Sends you your telegram ID(for OWNER_ID) Owner-only commands: /check Force a check of all RSS feeds NOW. If you don't want to use the bot anymore, simply remove it from a group. If you started a private chat with it, unsubscribe yourself from your feeds. 3) How to host it? The bot currently requires 4 files. helpfuljew.py <- The bot itself helpfuljew_config <- Configuration of a bot helpfuljew_feeds <- List of all the feeds the bot follows helpfuljew_entries <- A list to keep track what have been sent You can literally run it on anything that has python3 and internet access (Port-worwarding not required). If you do not like the name of my publicly available bot, simply write to @BotFather, create a bot, copy the TOKEN, paste the token in helpfuljew_config and run it. Congratulations. You are now hosting your own RSS bot. Don't forget to insert your Telegram ID in helpfuljew_config file in OWNER_ID field. To get your ID, write /myid to the bot. If by any chance you lose helpfuljew_feeds file, it is a game over. The bot will have no knowledge of the feeds people follow and you will have to start fresh. If by any chance you delete helpfuljew_entries file or lose its content, simply prepare a new empty helpfuljew_entries file. The bot will recognise, that the entries[] list is empty. It will go through all the feeds and save every available post to the entries[] list. Best case scenario: You lose nothing. Worse case scenario: You lose the very latest post that appeared between you deleting the file and running the script again. Deleting the content of helpfuljew_entries can also be helpful, when and if the file gets too heavy (space-wise). Simply: 1) run a /check command to check for latest posts and to send them to people 2) Turn off the bot. 3) Replace helpfuljew_entries with a fresh file. 4) Start the bot. 5) Done. 4) How it works? The bot refreshes all the feeds it follows every 1 hour (default). It goes through the entries[] list to check whether a post was already "indexed". If that is not the case, the bot will send the post to all the groups/people that follow the same feed. Once the very last person "unsubscribes" from a feed, the RSS link is removed from feeds{} dictionary. It will not be checked unless someone follows it again. The general refreshing happens in a thread, thus the bot is not blocked when it checks the feeds. The bot is, however, "occupied" if an owner issues /check command. * The main commands are available to everyone, even in a group. That means, ordinary people can interact with your group's RSS list. They can follow new feeds, they can remove already existing feeds. So keep that in mind. ---------- Created by KuchiKuu 2022-04-24