From 8f898d7233190be57819a31f6837daf233837919 Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Sat, 27 Aug 2022 16:10:11 +1000 Subject: [PATCH] now shows post URLs instead of null->null if available --- shitty_api.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shitty_api.sh b/shitty_api.sh index 798d424..2f2c8f4 100755 --- a/shitty_api.sh +++ b/shitty_api.sh @@ -12,7 +12,7 @@ TOKE=${tokes[0]} baseurl="https://$INSTANCE/api/v3/" # Please don't abuse jq like this showcomment='(.post | (.id | tostring)+" "+(.name | tostring)), -(.comment | (.parent_id | tostring)+"->"+(.id | tostring))+", "+(.creator.display_name // .creator.name)+":", +(.post.url // (.comment | (.parent_id | tostring)+"->"+(.id | tostring)))+", "+(.creator.display_name // .creator.name)+":", ((.comment // .post) | .published, (.body // .content)), ""' @@ -47,4 +47,4 @@ while getopts "a:h" o;do case "${o}" in esac done shift $((OPTIND-1)) -$* \ No newline at end of file +$*