Skip to content
René 'Necoro' Neumann edited this page May 25, 2020 · 5 revisions

Detailed Options

This page contains information about those options in the config.yml that need cannot be described in full in the config.yml.example

item-filter option

item-filter allows to specify a filtering function that returns true when an item of a feed should be included. Use cases might be filtering by category or author.

The function is stated in the expr DSL (Language Definition) and gets passed an instance of a gofeed.Item (Docs which provides all the fields necessary.

NB: This filter is applied after parsing the feed and after gofeed has translated the myriads of XML tags into its simpler structure. If you really need XML content for filtering, you should write the filter script yourself and use exec instead of a URL.

Examples

  • Only get items with a certain category: "Book" in Categories
  • Only get items with a set of categories any(Categories, {# in ["Book", "Literature", "Story"]})
  • Do not get items of this weirdo author: Author.Name != "Weirdo"
  • The feed duplicates all items, do not get those where the GUID ends with "-1": !(GUID endsWith "-1") or !(GUID matches "-1$")

Clone this wiki locally