2021-10-27 12:34:38 +02:00
|
|
|
# miniflux-filter
|
|
|
|
|
|
|
|
<!-- TOC titleSize:3 tabSpaces:2 depthFrom:2 depthTo:6 withLinks:1 updateOnSave:1 orderedList:0 skip:0 title:1 charForUnorderedList:* -->
|
|
|
|
### Table of Contents
|
|
|
|
* [Introduction](#introduction)
|
|
|
|
* [Getting Started](#getting-started)
|
|
|
|
* [example docker-compose](#example-docker-compose)
|
|
|
|
* [example filter-file](#example-filter-file)
|
|
|
|
* [Misc](#misc)
|
2021-11-01 16:45:31 +01:00
|
|
|
* [Debug](#debug)
|
|
|
|
* [Exit-Codes](#exit-codes)
|
|
|
|
* [Build Container](#build-container)
|
2021-10-27 12:34:38 +02:00
|
|
|
* [License](#license)
|
|
|
|
<!-- /TOC -->
|
|
|
|
|
|
|
|
### Introduction
|
2021-11-02 18:47:26 +01:00
|
|
|
``miniflux-filter`` is a small bash-script for [miniflux](https://miniflux.app) that marks certain articles as read, if the search conditions are met.
|
2021-10-27 12:34:38 +02:00
|
|
|
|
|
|
|
### Getting Started
|
2021-10-28 19:16:03 +02:00
|
|
|
1. create an [api-key](https://miniflux.app/docs/api.html#authentication) in miniflux
|
2021-10-27 12:34:38 +02:00
|
|
|
2. create a [compose-file](./docker-compose.yml)
|
|
|
|
3. create a [filter-file](./filter.txt)
|
|
|
|
4. ````docker-compose up````
|
|
|
|
|
|
|
|
#### example docker-compose
|
2021-11-02 19:47:22 +01:00
|
|
|
```yaml
|
2021-10-27 12:34:38 +02:00
|
|
|
version: '3.2'
|
|
|
|
services:
|
|
|
|
mf-filter:
|
|
|
|
container_name: mf-filter
|
|
|
|
restart: always
|
|
|
|
environment:
|
|
|
|
- TZ=Europe/Berlin
|
2021-11-01 16:45:31 +01:00
|
|
|
- MF_AUTH_TOKEN=XN2klsvvD[...]-dcHPaeQ=
|
|
|
|
- MF_API_URL=https://miniflux.[...].net/v1
|
|
|
|
- MF_SLEEP=60
|
|
|
|
#- MF_DEBUG=1
|
2021-10-27 12:34:38 +02:00
|
|
|
image: quotengrote/miniflux-filter:latest
|
|
|
|
volumes:
|
|
|
|
- ./filter.txt:/data/filter.txt
|
|
|
|
|
|
|
|
```
|
|
|
|
#### example filter-file
|
2021-11-02 19:47:22 +01:00
|
|
|
```ini
|
2021-10-27 12:34:38 +02:00
|
|
|
<part_of_url>:<search string, anything goes, but not :>
|
|
|
|
sueddeutsche.de:FC Bayern
|
|
|
|
heise.de:software-architektur.tv
|
|
|
|
heise.de:heise-angebot
|
|
|
|
tagesschau.de:FC Barcelona
|
|
|
|
heise.de:TechStage |
|
|
|
|
[...]
|
|
|
|
```
|
|
|
|
|
|
|
|
## Misc
|
|
|
|
- [tborychowski/miniflux-filter](https://github.com/tborychowski/miniflux-filter)
|
|
|
|
- [jqplay.org](https://jqplay.org)
|
|
|
|
|
2021-11-01 16:45:31 +01:00
|
|
|
### Debug
|
2021-11-01 16:56:42 +01:00
|
|
|
If `MF_DEBUG` is set to `1`, `miniflux-filter` will print extra output to stdout.
|
2021-11-01 16:45:31 +01:00
|
|
|
- the current Variable
|
|
|
|
- URL + Values for filtering
|
|
|
|
- almost all function calls
|
|
|
|
|
|
|
|
#### Exit-Codes
|
|
|
|
| RC | Description |
|
|
|
|
| -- | -- |
|
2021-11-02 19:47:22 +01:00
|
|
|
| 1 | `$MF_FILTERLIST_FILE` not found |
|
|
|
|
| 2 | `$MF_AUTH_TOKEN` not set |
|
|
|
|
| 3 | `$MF_API_URL` not set |
|
|
|
|
| 4 | `$MF_FILTERLIST_FILE` is a dir |
|
2021-11-02 19:43:51 +01:00
|
|
|
| 5 | `jq` is not installed |
|
|
|
|
| 6 | `curl` is not installed |
|
|
|
|
| 7 | could not connect to `miniflux` |
|
|
|
|
| 8 | `xargs` is not installed |
|
|
|
|
| 9 | `sed` is not installed |
|
|
|
|
| 10 | `sort` is not installed |
|
2021-11-01 16:45:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
## Build Container
|
2021-11-02 19:47:22 +01:00
|
|
|
```shell
|
2021-11-01 16:45:31 +01:00
|
|
|
git clone https://git.mgrote.net/mg/miniflux-filter
|
|
|
|
cd miniflux-filter
|
2021-11-02 19:48:26 +01:00
|
|
|
export MF_DOCKERHUB_PASS=<your_docker_hub_pass>
|
|
|
|
export MF_DOCKERHUB_USER=<your_docker_hub_user>
|
2021-11-01 16:45:31 +01:00
|
|
|
./build.sh
|
2021-11-01 16:56:42 +01:00
|
|
|
```
|
2021-10-27 12:34:38 +02:00
|
|
|
|
2021-11-02 19:47:22 +01:00
|
|
|
|
2021-10-27 12:34:38 +02:00
|
|
|
## License
|
|
|
|
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](./LICENSE) file for details.
|