https://github.com/sainathadapa/generate-rss-feed
Generate a feed with posts from Reddit, HackerNews and other RSS/Atom feeds
https://github.com/sainathadapa/generate-rss-feed
python reddit rss-feed
Last synced: 8 months ago
JSON representation
Generate a feed with posts from Reddit, HackerNews and other RSS/Atom feeds
- Host: GitHub
- URL: https://github.com/sainathadapa/generate-rss-feed
- Owner: sainathadapa
- License: mit
- Created: 2017-02-09T14:47:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T00:51:16.000Z (over 3 years ago)
- Last Synced: 2025-03-11T08:47:29.032Z (over 1 year ago)
- Topics: python, reddit, rss-feed
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
The python script in this repository generates a Atom feed with
- Top posts from Reddit
- Top posts from HackerNews
- Posts from other RSS/Atom feeds
--------
Reasons for writing this script:
1. Want to use Feedly as a single point for browsing through 'interesting' posts
2. Do not want to look at posts in Reddit/HackerNews which have zero comments
3. Do not want to look at posts which I have already seen (This happens with Google News feeds. If a particular topic does not have new news stories frequently, I keep seeing the same new stories again and again).
Directly adding Sub-Reddits, HackerNews or Google News in Feedly, does not solve the issue of not wanting to see the zero comments posts, or repeated posts. Hence wrote a simple script to achieve my goals.
---------
Instructions:
1. Install the following python modules:
- praw
- feedgen
- hackernews-python
- numpy
- pandas
- tzlocal
2. Edit the config file (Description of the config file below)
3. Run the script by invoking the command `python3 generate_feed.py config.json`
4. Run the script periodically, by adding to cron
--------
Config file description:
- `subreddits` : Specify the list of subreddits from which to gather the posts. Each element here is a key-value pair, with the key being the subreddit name, and the value being the time filter that needs to be used (all, day, hour, month, week, year).
- `reddit_credentials`: Specify the reddit access credentials. Look [here](https://praw.readthedocs.io/en/latest/getting_started/authentication.html) to know how to acquire access codes.
- `reddit_min_comments`: Only add posts with the number of comments greater than this value.
- `reddit_num_posts`: Number of posts to gather from each subreddit
- `feed_sources`: Specify RSS feed urls from which to gather posts from
- `add_hn_entries`: true if posts from HackerNews need to be acquired
- `hn_num_posts`: Only add posts with the number of comments greater than this value
- `max_items_feed`: Maximum number of items in the generated feed
- `cache_path`: Location where the cached data can be stored
- `feed_url`: URL to the location where the generated feed will be published
- `save_path`: Location where the generated feed file needs to be saved