Giter Club home page Giter Club logo

miniflux-sidekick's Introduction

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.

miniflux-sidekick's People

Contributors

bcongdon avatar dewey avatar erik avatar justinmayer avatar quotengrote avatar thor77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

miniflux-sidekick's Issues

Periodically reload rules

Right now you have to restart to pull in new rules, it should automatically reload every 30min especially if it's a remote killfile.

Bug with updating of read status

Miniflux:

[ERROR] [HTTP:Internal Server Error] /v1/entries => nothing has been updated

Miniflux Sidekick:

level=error ts=2019-07-09T21:30:00.558714025Z caller=service.go:127 msg="error on updating the feed entries" err="miniflux: internal server error"

Filters with spaces are silently ignored

Filters with more than 2 spaces are silently ignored. It would be great if these worked (or failed loudly).

Two example filters:

ignore-article "*" "title =~ Update for .*day"
ignore-article "*" "title # Daily Deals"

Make title tag matching case insensitive.

I have a killfile where I need to do this:

ignore-article "https://electrek.co/feed/" "title # Podcast,podcast,Motorcyle,motorcyle,Scooter,scooter,Moped,moped"

Which is a bit obnoxious. It'd be nice if the matching could be case insensitive.

The negation rule doesn't work as expected.

It seems that when the negation rule (!# or !~) is present along with other positive rules (# or ~), it doesn't work as expected.

The filter seems to ignore the negation rule's previous "<feed>" that should be matched, causing all feeds to be applied with the negation rule, resulting in those that should not be filter being marked as read.

By the way, I would like to know how to change the log-level to debug, now $ docker-compose logs app doesn't show the related logs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.