That's what I was using post titles on comments for

This commit is contained in:
Zergling_man 2022-09-15 02:12:57 +10:00
parent 738377eeb9
commit 75e21e8ef1

View File

@ -24,9 +24,15 @@ showcomment='(.comment | (.parent_id | tostring)+"->"+(.id | tostring))+", "+(.c
((.comment // .post) | .published, ((.comment // .post) | .published,
(.body // .content)), (.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)),
""'
comments=".[] | $showcomment" comments=".[] | $showcomment"
posts=".[] | $showpost" posts=".[] | $showpost"
notifs=".[] | $notif"
#Generics #Generics
get(){ curl -s "$baseurl$1?${*:3}" | jq "$2"; } get(){ curl -s "$baseurl$1?${*:3}" | jq "$2"; }
@ -41,7 +47,7 @@ getbody(){ a=$(cat); body=${a//\"/\\\"}; }
actions="notifs notifs2 comments freepost shitpost follow unfollow following deref whoami login" actions="notifs notifs2 comments freepost shitpost follow unfollow following deref whoami login"
#Endpoints. #Endpoints.
#Lurkan #Lurkan
notifs(){ getauth "user/replies" ".replies | $comments"; } notifs(){ getauth "user/replies" ".replies | $notifs"; }
notifs2(){ getauth "user/mention"; } notifs2(){ getauth "user/mention"; }
following(){ getauth "post/list" ".posts | $posts" "type_=Subscribed"; } following(){ getauth "post/list" ".posts | $posts" "type_=Subscribed"; }
comments(){ getauth "post" "(.post_view | $showpost), (.comments | reverse | $comments)" "id=$1"; } comments(){ getauth "post" "(.post_view | $showpost), (.comments | reverse | $comments)" "id=$1"; }