From 34439334f19145e6eb48c35f2e56acf78cea4f75 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Fri, 15 Apr 2022 20:05:15 +0300 Subject: [PATCH] render statuses format more readable --- config.json | 1 + pleroma-cli.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config.json b/config.json index fd52a27..e3d084d 100644 --- a/config.json +++ b/config.json @@ -6,6 +6,7 @@ "default_visibility": "unlisted", "format_time": "+%d.%m.%Y %H:%M:%S", "boost_symbol": "[>>]", + "statuses_separator": "\n==========", "reversed_statuses": false, "quoting_reply": true, "public_list_instances": [ diff --git a/pleroma-cli.sh b/pleroma-cli.sh index cb69b5e..071e014 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -11,6 +11,7 @@ default_visibility=$(jj -i config.json default_visibility) default_content_type=$(jj -i config.json default_content_type) format_time=$(jj -i config.json format_time) boost_symbol=$(jj -i config.json boost_symbol) +statuses_separator=$(jj -i config.json statuses_separator) reversed_statuses=$(jj -i config.json reversed_statuses) quoting_reply=$(jj -i config.json quoting_reply) @@ -322,18 +323,21 @@ statuses_render() fi for i in $ids_massive; do status=$(echo "$jsonmassive" | jj "#[id=$i]") - + + whoacct=$(echo $status | jj account.acct) reblog=$(echo $status | jj reblog.id) uri=$(echo $status | jj uri) id_status=$(echo $status | jj id) dateutc=$(echo $status | jj created_at) reply_to_id=$(echo $status | jj in_reply_to_id) - echo "$(date -d $dateutc "$format_time") <$id_status> $uri" + visibility_status=$(echo $status | jj visibility) + echo "| $(date -d $dateutc "$format_time") $visibility_status $whoacct" + echo "| <$id_status> $uri" if [ -n "$reply_to_id" ]; then - echo "Reply to: $reply_to_id" + echo "| Reply to: $reply_to_id" fi if [ -n "$reblog" ]; then - echo "$boost_symbol $reblog" + echo "| $boost_symbol $reblog" fi spoiler_text=$(echo "$status" | jj spoiler_text) if [ -n "$spoiler_text" ]; then @@ -345,7 +349,7 @@ statuses_render() echo "#EXTINF:-1, $uri" >> attachments.m3u8 echo "$attachments" >> attachments.m3u8 fi - echo '==========' + echo "$statuses_separator" done }