mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 02:01:27 +00:00
render statuses format more readable
This commit is contained in:
parent
098669af16
commit
34439334f1
|
@ -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": [
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
@ -323,17 +324,20 @@ statuses_render()
|
|||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue