Home
Fix j(a)q syntax in get-pleroma-instances. - gopher-lawn - The gopher lawn gopher directory project. HTML git clone git://bitreich.org/gopher-lawn/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/gopher-lawn/ DIR Log DIR Files DIR Refs DIR Tags --- DIR commit c5e45c9085eb9902c6fd140ad274e82c18f42f3b DIR parent f0b1b8d0b43fe141ec73bdf335b2a5977818b426 HTML Author: Christoph Lohmann <20h@r-36.net> Date: Tue, 9 Jul 2024 21:16:24 +0200 Fix j(a)q syntax in get-pleroma-instances. Diffstat: M fediverse/get-pleroma-instances.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- DIR diff --git a/fediverse/get-pleroma-instances.sh b/fediverse/get-pleroma-instances.sh @@ -1,9 +1,12 @@ #!/bin/sh + +JQ="jaq" + sed 's,",\\",g; s,$,\\n,' <<-EOF \ | tr -d '\n' \ | sed 's,^\(.*\)$,{"query":"\1"},' \ | curl -s -H'Content-Type: application/json' --data-binary @- https://api.fediverse.observer/ \ - | jaq '$1 == ".data.nodes[].domain" { print $3 }' + | $JQ -r '.data.nodes[].domain' { nodes(softwarename: "pleroma", status: "UP") { domain