ff
This commit is contained in:
parent
862e5898ad
commit
ba6f13bf02
1 changed files with 6 additions and 6 deletions
12
filter.sh
12
filter.sh
|
@ -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=""
|
||||
|
|
Loading…
Reference in a new issue