A lightweight service for posting data from an RSS feed to configuration-driven destinations, written in Python.
RSSConsumer
- consumes the title, link, and description of RSS feed items.
RSSLinkContentConsumer
- follows the RSS feed items' links and consumes their title and the content returned by a request to the link urls.
ConsoleConsumer
- for development and manual testing. Prompts the user for input via stdin.
ElasticsearchProducer
- produces data to Elasticsearch.
DiscourseProducer
- produces data to Discourse in the form of a message board post.
ConsoleProducer
- for development and manual testing. Produces data to stdout.
Included is a systemd .service file and an example config.yaml file. You will need to modify these files for your specifc needs.
- Run the init.py script to set up the sqlite3 db which keeps track of which RSS items have been posted.
- Alter the User and ExecStart fields in the systemd service file to work with your environment in the service file.
- Provide a list of the urls for the RSS feeds you wish to aggregate in the config file.
- (optional) If you are using the Discourse producer, provide the url with api key for your Discourse instance in the config file.
- Choose the consumer you would like to use from the options specified above.
- Choose the producer from the options specified aboce.
Producing RSS link content to Elasticsearch:
python main.py --config-file ./config.yaml --consumer=RSSLinkContentConsumer --producer=ElasticsearchProducer --producer-dest=localhost:9200
Producing RSS titles, links, descriptions to Discourse:
python main.py --config-file ./config.yaml --consumer=RSSConsumer --producer=DiscourseProducer
Producing user-prompted stdin to stdout (KeyboardInterrupt to stop consumer)
python main.py --config-file ./config.yaml --consumer=ConsoleConsumer --producer=ConsoleProducer