glance icon indicating copy to clipboard operation
glance copied to clipboard

Rss Feed Filter

Open Chrissi2812 opened this issue 1 year ago • 3 comments

Would be awesome to have the possibilty to filter the rss feeds on arbitary fields.

Something like this


- type: rss
  title: News
  style: horizontal-cards
  feeds:
    - url: https://feeds.bloomberg.com/markets/news.rss
      title: Bloomberg
      filters: # adding this Filter
        - field: title
          value: /Alert/i # RegEx or Just string?
        - field: category
          value: Business
    - url: https://feeds.feedburner.com/crunchyroll/rss/anime?lang=deDE
      title: Crunchyroll
      filters:
        - field: crunchyroll:seriesTitle # or just seriesTitle or extensions.seriesTitle ? Don't know how they get parsed by gofeed
          value: # Here the values should be combined by OR because they would never match both
            - /Failure Frame/i # if matched
            - Berserk of Gluttony # Exact Value

Chrissi2812 avatar Aug 08 '24 21:08 Chrissi2812

Hey, thanks for the idea!

I've actually been thinking about this exact same thing for the last week or so. 😅 Not sure if regular expressions are the way to go or something more advanced like expr-lang/expr which would give a ton more flexibility in what you can do.

svilenmarkov avatar Aug 09 '24 12:08 svilenmarkov

That expr-lang/expr looks way better than what I had on my mind. And the syntax is pretty easy to understand just converted my example from above.


- type: rss
  title: News
  style: horizontal-cards
  feeds:
    - url: https://feeds.bloomberg.com/markets/news.rss
      title: Bloomberg
      filter: "{.title matches 'Alert' or .category == 'Business'}"
    - url: https://feeds.feedburner.com/crunchyroll/rss/anime?lang=deDE
      title: Crunchyroll
      filter: "{lower(.title) matches 'failure frame' or .title in ['Berserk of Gluttony'])}" # Not sure on quotes ^^

~Also could be useful for other parts as well like #148~

Chrissi2812 avatar Aug 12 '24 15:08 Chrissi2812

Also could the RSSFeedItem be extended with the Item.Extensions from gofeed to filter on those extra fields aswell?

Because the cruchyroll example packs a lot of info into their own fields and they would be really helpful for filtering

Chrissi2812 avatar Aug 12 '24 15:08 Chrissi2812