diff --git a/src/blog/posts/2024/9/filter-rss-podcast-feeds.md b/src/blog/posts/2024/9/filter-rss-podcast-feeds.md new file mode 100644 index 0000000..bb17284 --- /dev/null +++ b/src/blog/posts/2024/9/filter-rss-podcast-feeds.md @@ -0,0 +1,28 @@ +---json +{ + "title": "Filter RSS/Podcast feeds", + "date": "2024-09-26T07:30:00.873Z", + "tags": [ + "rss", + "podcast", + "php" + ], + "excerpt": "Instead of finding a better Podcast app, I created a little PHP utility server to allow me to filter and rename Podcast (and by extension, RSS) feeds to create playlists." +} +--- + +I [mentioned a while ago](/post/filtering-podcast-feeds) that I wanted a way to filter Podcasts into multiple separate feeds based on their content. The tool I mention in the previous post, [SiftRSS](https://www.siftrss.com) is pretty good, but the only thing it doesn't currently do is let you change the name of the feed, which means I end up with several feeds with identical names. + +So, I made my own: [Baleen](https://git.lewisdale.dev/lewis/baleen). It's pretty simple, and it's a hobby project so the UX sucks - it's _just_ usable enough to be functional, but also that's because I wrote it. I'll hopefully make some changes in the future, but no promises. + +How it works is fairly simple. I can register a feed and a set of filters using the CLI: + +```bash +php bin/doctrine test:feed -f include -t title -a "Something" "New feed title" +``` + +This creates a new RSS feed, called "New feed title", which only includes posts from the feed URL that include the title "Something". I could also exclude certain titles with `-f exclude`, for example. + +Filtering is excruciatingly simple. It's just using XPaths on the target elements, joined by a pipe - so multiple filters work as an `OR`, not an `AND`. + +Anyway, this was a fun little project to create that solves a very specific problem. \ No newline at end of file