now shows post URLs instead of null->null if available

This commit is contained in:
Zergling_man 2022-08-27 16:10:11 +10:00
parent 23a0d89b3b
commit 8f898d7233

View File

@ -12,7 +12,7 @@ TOKE=${tokes[0]}
baseurl="https://$INSTANCE/api/v3/" baseurl="https://$INSTANCE/api/v3/"
# Please don't abuse jq like this # Please don't abuse jq like this
showcomment='(.post | (.id | tostring)+" "+(.name | tostring)), 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, ((.comment // .post) | .published,
(.body // .content)), (.body // .content)),
""' ""'