From b14609f6ad98171b724814ef245bb7c9b08ba985 Mon Sep 17 00:00:00 2001 From: mg Date: Tue, 2 Nov 2021 19:18:26 +0100 Subject: [PATCH] added filtering based on content (#3) Co-authored-by: Michael Grote Reviewed-on: https://git.mgrote.net/mg/miniflux-filter/pulls/3 Co-authored-by: mg Co-committed-by: mg --- README.md | 4 ---- filter.sh | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 745e29d..6b66533 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ * [Debug](#debug) * [Exit-Codes](#exit-codes) * [Build Container](#build-container) -* [ToDo](#todo) * [License](#license) @@ -86,8 +85,5 @@ export MF_DOCKER_HUB_USER= ./build.sh ``` -## ToDo -- [ ] search in content, not only title - ## License This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](./LICENSE) file for details. diff --git a/filter.sh b/filter.sh index 87c5bdd..4e970f4 100755 --- a/filter.sh +++ b/filter.sh @@ -11,7 +11,7 @@ MF_FILTERLIST_FILE="${MF_FILTERLIST_FILE:=/data/filter.txt}" MF_SLEEP="${MF_SLEEP:=30}" ### MF_DEBUG output # standardmäßig 0 = aus -MF_DEBUG="${MF_[DEBUG]=0}" +MF_DEBUG="${MF_DEBUG=0}" # Functions function output_help { @@ -163,6 +163,7 @@ function filter_entries { fi # das leerzeichen am anfang ist notwendig, trennt die zahlenwerte marked_entries+=" $(echo "$unread_entries" | jq --arg url "$url" --arg suchbegriff "$suchbegriff" '.entries[] | select(.feed.site_url | ascii_downcase | contains($url)) | select(.title | ascii_downcase | contains($suchbegriff)) | .id' )" + marked_entries+=" $(echo "$unread_entries" | jq --arg url "$url" --arg suchbegriff "$suchbegriff" '.entries[] | select(.feed.site_url | ascii_downcase | contains($url)) | select(.content | ascii_downcase | contains($suchbegriff)) | .id' )" fi fi done < "$MF_FILTERLIST_FILE"