Skip to content

A sidekick for Miniflux, filter out items by regex or tags. Compatible with killfiles. 🔪

License

Notifications You must be signed in to change notification settings

dewey/miniflux-sidekick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Miniflux Sidekick

This is a sidekick container that runs alongside Miniflux which is an Open Source RSS feed reader written in Go. You can check out the source code on GitHub.

The goal is to support so called Killfiles to filter out items you don't want to see. You can think of it as an ad-blocker for your feed reader. The items are not deleted, they are just marked as read so you can still find all items in your feed reader if you have to.

Features

  • Supports a subset of so called UseNet killfiles rules
  • Supports remote killfile (Share one killfile with other people, similar to ad-blocking lists)
  • Supports local killfiles on disk

Supported Rules

The general format of the killfile is:

ignore-article "<feed>" "<filterexpr>"

<feed>

This contains the URL of the feed that should be matched. It fuzzy matches the URL so if you only have one feed just use the base URL of the site. Example: https://example.com if the feed is on https://example.com/rss/atom.xml. A wildcard selector of * is also supported instead of the URL.

<filterexpr> Filter Expressions

From the available rule set and attributes (Table 5. Available Attributes) only a small subset are supported right now. These should cover most use cases already though.

Attributes

  • title
  • content

Comparison Operators

  • =~: test whether regular expression matches
  • !~: logical negation of the =~ operator
  • #: contains; this operator matches if a word is contained in a list of space-separated words (useful for matching tags, see below)
  • !#: contains not; the negation of the # operator

Example

Here's an example of what a killfile could look like with these rules.

This one marks all feed items as read that have a [Sponsor] string in the title.

ignore-article "https://www.example.com" "title =~ \[Sponsor\]"

This one filters out all feed items that have the word Lunar OR moon in there.

ignore-article "https://xkcd.com/atom.xml" "title # Lunar,Moon"

This one filters out all feed items that have the word lunar OR moon in there and is case insensitive.

ignore-article "https://xkcd.com/atom.xml" "title =~ (?i)(lunAR|MOON)"

Testing rules

There are tests in filter/ that can be used to easily test rules or add new comparison operators.

Deploy

There are the environment variables that can be set. If you want to use a local file you can set MF_KILLFILE_PATH="~/path/to/killfile". A local killfile always overwrites a remote one, even if the remote killfile URL is set (MF_KILLFILE_URL). MF_USERNAME, MF_PASSWORD and MF_API_ENDPOINT are your Miniflux credentials. If MF_REFRESH_INTERVAL isn't set it's running on every 30 minutes of every hour (0 30 * * * *).

export MF_ENVIRONMENT=development
export MF_PORT=8181
export MF_USERNAME=dewey
export MF_PASSWORD="changeme"
export MF_API_ENDPOINT=https://rss.notmyhostna.me
export MF_KILLFILE_URL=https://raw.githubusercontent.com/dewey/miniflux-sidekick/master/killfile
export MF_REFRESH_INTERVAL="0 30 * * * *"
export MF_KILLFILE_REFRESH_HOURS=2

There's also a Dockerfile and Docker Compose file included so you can easily run it via docker-compose -f docker-compose.yml up -d.

See Also

Miniflux v2.0.25 added built-in support for filtering rules.