Filters Miniflux entries based on enhanced rules.
minifluxWorker reads rules from a configuration file and marks entries as read based on them.
The following options are supported:
USAGE
minifluxWorker [OPTION]
OPTIONS
-c string
Path to config file (default "config.json")
-dry-run
Do not change anything
-help
Print this help
The sample config looks like this:
A config file consists of some top-level headers and a list of rules where every key is required.
The server config consists of the following keys: The general part consists of a server configuration and the log level:
server
(object): The server config
url
(string): The servers URLtoken
(string): A token as obtained via Settings > API Keysloglevel
(string, one of "DEBUG", "INFO", "WARN", "ERROR" or "FATAL): The
log levelThe log level has to be must be set to "DEBUG" (useful to learn what minifluxWorker is attempting to do), "INFO" (useful to monitor), "WARN" (useful to mitigate problems), "ERROR" (problems occurred) or "FATAL" (problems fatal enough to crash the application).
"server": {
"url": "https://hosting.miniflux.app",
"token": "SE1KUGI5YWxIcWFJekJhbHBRaktkTHRRY1pBV01CXzZI="
},
"loglevel": "INFO",
A rule consists of the following keys:
name
(string): A name for the rule, can be chosen freelycondition
(object): What trigger the rule should act on
type
(string, one of "time", "title", "text" or "duplicate"): What kind
of rule is enforcedkey
(string, a integer duration and one of "m", "h", "d" or "w" for
rules based on time, else a keyword or sentence of choice): The specific value
the rule considersscope
(object): On what the rule should be enforced
type
(string, one of "all", "category" or "feed"):operator
(string, one of "with" or "without"): Inverts the rule: Either
only the scope or everything without the scope is evaluatedkeys
(list of strings): A freely chosen keyword or sentence to match the
feeds/categories name(s)include_starred
(boolean): Disregards all starred entries if false
All in a valid configuration file looks like this:
{
"server": {
"url": "https://hosting.miniflux.app",
"token": ""
},
"loglevel": "INFO",
"rules": [
{
"name": "All entries but the feeds 'Knowledge' and 'Popular blog' after two weeks",
"condition": {
"type": "time",
"key": "2w"
},
"scope": {
"type": "feed",
"operator": "without",
"keys": ["Knowledge", "Popular blog"]
},
"include_starred": true
},
{
"name": "Unstarred entries with 'boring topic' in it's title",
"condition": {
"type": "title",
"key": "boring topic"
},
"scope": {
"type": "all",
"operator": "with",
"keys": []
},
"include_starred": false
}
]
}
minifluxWorker will act as soon as started. For scheduling a cronjob or a systemd timer can be used.
go build .
Please write your commit messages as Conventional Commits.
This project is licensed under the European Union Public License v1.2. Please see License for more information.