You've already forked miniflux_lwn
fix order and make yq work as json
This commit is contained in:
7
run.sh
7
run.sh
@@ -39,7 +39,8 @@ filter_entries() {
|
||||
mlr --l2n \
|
||||
filter '$title =~ "\[\$\]"' \
|
||||
+ filter -s w1="$1" -s w2="$2" '$published_at > @w2 && $published_at < @w1' \
|
||||
+ cut -of id,title
|
||||
+ cut -of id,title \
|
||||
+ tac
|
||||
}
|
||||
|
||||
main() {
|
||||
@@ -56,9 +57,9 @@ main() {
|
||||
curl -s --fail "$MURL/v1/feeds/$FID/entries" \
|
||||
--url-query limit=150 \
|
||||
--url-query order=id \
|
||||
--url-query direction=asc \
|
||||
--url-query direction=desc \
|
||||
-H "X-Auth-Token: $TOKEN" |
|
||||
yq '.entries[]' |
|
||||
yq -pj -oj '.entries[]' |
|
||||
filter_entries "$w1" "$w2" |
|
||||
while read -r eid title; do
|
||||
echo "processing entry: $eid title: $title"
|
||||
|
||||
Reference in New Issue
Block a user