2023-01-17 01:07:40 +11:00
|
|
|
# Please don't abuse jq like this
|
|
|
|
showpost='(.post | (.id | tostring)+" "+(.name | tostring)),
|
|
|
|
(.post.url)+", "+(.creator.display_name // .creator.name)+":",
|
|
|
|
((.comment // .post) | .published,
|
|
|
|
(.body // .content)),
|
|
|
|
""'
|
|
|
|
postsummary='(.post | (.id | tostring)+" "+(.name | tostring)),
|
|
|
|
(.post.url)+", "+(.creator.display_name // .creator.name)+":",
|
|
|
|
((.comment // .post) | .published),
|
|
|
|
""'
|
2023-06-02 11:16:28 +10:00
|
|
|
showcomment='(.comment | .path[2:])+", "+(.creator.display_name // .creator.name)+":",
|
2023-01-17 01:07:40 +11:00
|
|
|
((.comment // .post) | .published,
|
|
|
|
(.body // .content)),
|
|
|
|
""'
|
|
|
|
#Split this out because I specifically do want to include post IDs in some places. Or rather, I only don't want to include them on the comments view.
|
|
|
|
notif='(.comment | (.parent_id | tostring)+"->"+(.id | tostring))+" ("+(.post | (.id | tostring))+"), "+(.creator.display_name // .creator.name)+":",
|
|
|
|
((.comment // .post) | .published,
|
|
|
|
(.body // .content)),
|
|
|
|
""'
|
|
|
|
|
2023-06-02 10:38:41 +10:00
|
|
|
comments_view=".[] | $showcomment"
|
2023-01-17 01:07:40 +11:00
|
|
|
posts=".[] | $showpost"
|
2023-06-02 10:38:41 +10:00
|
|
|
notifs=".[] | $notif"
|