ff
This commit is contained in:
parent
4ea18d12cc
commit
70b7e79e6a
1 changed files with 3 additions and 2 deletions
|
@ -178,12 +178,13 @@ function filter_entries {
|
|||
fi
|
||||
# das leerzeichen am anfang ist notwendig, trennt die zahlenwerte
|
||||
# suche in titel
|
||||
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' )"
|
||||
titles+=" $(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' )"
|
||||
# suche in content
|
||||
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' )"
|
||||
content+=" $(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
|
||||
# sortiere und forme marked_entries um
|
||||
marked_entries=$(echo $title $content)
|
||||
# https://unix.stackexchange.com/questions/353321/remove-all-duplicate-word-from-string-using-shell-script
|
||||
# entfernt doppelte eintraege innerhalb einer zeile
|
||||
marked_entries=$(echo marked_entries | xargs -n1 | sort -u | xargs | sed -r 's/\s/\, /g')
|
||||
|
|
Loading…
Reference in a new issue