Reverse-sort (by date) all post-responses
This commit is contained in:
parent
dafae250c5
commit
6d4398f8a7
|
@ -148,7 +148,10 @@ media_attachments() {
|
|||
# Pass a post’s context JSON along stdin; out comes the response_data in JSON.
|
||||
# fetch_post_context $url | context_to_responses
|
||||
context_to_responses() {
|
||||
jq -cr '.descendants[]'
|
||||
jq '.descendants' \
|
||||
| jq 'sort_by(.created_at)' \
|
||||
| jq 'reverse' \
|
||||
| jq -cr '.[]'
|
||||
}
|
||||
|
||||
|
||||
|
|
Ŝarĝante…
Reference in New Issue