ff
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Michael Grote 2024-05-07 02:29:08 +02:00
parent 862e5898ad
commit ba6f13bf02

View file

@ -201,12 +201,12 @@ function mark_as_read {
# sed wandelt 123 345 456 in 123, 245, 345 um.
if [[ $(echo "$marked_entries" | xargs -n1 | sort -u | xargs | sed -r 's/\s/\, /g') ]]; then
curl --request PUT --silent --header "X-Auth-Token: $MF_AUTH_TOKEN" --header "Content-Type: application/json" --data "{\"entry_ids\": [$(echo "$marked_entries" | xargs -n1 | sort -u | xargs | sed -r 's/\s/\, /g')], \"status\": \"read\"}" "$MF_API_URL/entries"
# gebe entry-titel aus
for i in $(echo "$marked_entries" | xargs -n1 | sort -u | xargs); do
# gebe aus welcher eintrag gefiltert wurde, cut begrenzt die maximale laenge auf 100 zeichen
# jq "XXX", fügt XXX in ausgabe hinzu
echo [INFO] Filtered entry "$i" - "$(curl --silent --header "X-Auth-Token: $MF_AUTH_TOKEN" "$MF_API_URL"/entries/"$i" | jq --join-output '"url: ",.feed.site_url," - title: ", .title' | cut -c -100)".
done
# gebe entry-titel aus
for i in $(echo "$marked_entries" | xargs -n1 | sort -u | xargs); do
# gebe aus welcher eintrag gefiltert wurde, cut begrenzt die maximale laenge auf 100 zeichen
# jq "XXX", fügt XXX in ausgabe hinzu
echo [INFO] Filtered entry "$i" - "$(curl --silent --header "X-Auth-Token: $MF_AUTH_TOKEN" "$MF_API_URL"/entries/"$i" | jq --join-output '"url: ",.feed.site_url," - title: ", .title' | cut -c -100)".
done
fi
# setze variablen auf leer
marked_entries=""