From 13a79f0d34ec4f8eaa2f746bb3d60473d39b28a0 Mon Sep 17 00:00:00 2001 From: Balakrishnan Balasubramanian Date: Thu, 3 Jul 2025 09:35:46 -0400 Subject: [PATCH] Fix Quoting problem in title Add jo as dependency. Fix crash with below title [$] Libxml2's "no security embargoes" policy Updates --- README.md | 2 ++ run.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dfa5a9e..5c099ae 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ available to all. This script is for [lwn][0]. * [yq][1] * [miller][2] +* [jo][3] ### Usage @@ -41,3 +42,4 @@ Marking as unread. entry: 3060 title: [$] An end to uniprocessor configurations [0]: https://lwn.net [1]: https://github.com/mikefarah/yq [2]: https://github.com/johnkerl/miller +[3]: https://github.com/jpmens/jo diff --git a/run.sh b/run.sh index 5377c1d..6ca82d5 100755 --- a/run.sh +++ b/run.sh @@ -16,12 +16,12 @@ process() { echo "Updating title. entry: $eid title: $title" curl --fail -o /dev/null -s -X PUT "$MURL/v1/entries/$eid" \ - --json "$(printf '{"title":"%s"}' "${title/$/✓}")" \ + --json "$(jo title="${title/$/✓}")" \ -H "X-Auth-Token: $MINIFLUX_TOKEN" echo "Marking as unread. entry: $eid title: $title" curl --fail -s -X PUT "$MURL/v1/entries" \ - --json "$(printf '{"entry_ids":[%s],"status":"unread"}' "$eid")" \ + --json "$(jo entry_ids="$(jo -a "$eid")" status=unread)" \ -H "X-Auth-Token: $MINIFLUX_TOKEN" }