Project Debrief: Filter Feed

Note: this post is probably of low interest. I am simply making a record of some little personal projects I have made.

Project Goals

I subscribe to several podcasts and RSS feeds which include some posts I’m not interested in. For example, USGS has a feed of volcano statuses but I only want to subscribe to my local volcano. My podcast app and feed reader don’t have filtering of episodes built in, so I wanted to create an app that would apply filters while proxying requests.

High Level Design

Filter feed is a Google Cloud Run app. Each feed has a unique ID, and and a app URL containing that ID is given to the feed reader. When the feed reader loads the feed from the app, configuration on what filtering to do is loaded from a Datastore entry, the upstream feed is fetched and filtered before being returned to the feed reader app.

Implementation Notes

Code: https://github.com/davidn/filter-feed

We use jQuery Query Builder as an interface for defining power filters on feeds:

Filter feed admin illustrating Query Builder for specifying a custom filter

Much of the code is dedicated to correctly handling both Atom and RSS, as well as coaxing xml.etree to make the deserialize-filter-serialize round trip preserve as much of the original XML as possible.

An admin interface was a later addition. This necessitated adding user and login to prevent 3rd parties modifying my filters. For this I used flask-security-too. I would note that was not a polished experience, and I would recommend against Flask for any project that requires log-ins and permissions.

Project Fate

I continue to use this app for RSS feed filtering, although I no longer use it for podcasts as I found a podcast app with enough filtering built in. If this app would be useful to you, I can provide you an account, just reach out to me.

Leave a Reply

Your email address will not be published. Required fields are marked *