mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-29 23:01:28 +00:00
Compare commits
No commits in common. "135554fe5b07b4e3e3dbc19189004864b1d4bd16" and "02c1c0b912bc56312f0b5fd09518aa1b4e71c342" have entirely different histories.
135554fe5b
...
02c1c0b912
|
@ -2,8 +2,7 @@
|
|||
"instance": "soc.phreedom.club",
|
||||
"max_statuses": 40,
|
||||
"per_status_mode": false,
|
||||
"enabled_nsfw": true,
|
||||
"hide_reblogs": false,
|
||||
"enabled_nsfw": false,
|
||||
"default_content_type": "text/markdown",
|
||||
"default_visibility": "unlisted",
|
||||
"format_time": "+%d.%m.%Y %H:%M:%S",
|
||||
|
|
|
@ -6,7 +6,6 @@ instance_point="https://$instance/api/v1"
|
|||
instance_point_pleroma="https://$instance/api/pleroma"
|
||||
instance_hist='instance.hist'
|
||||
enabled_nsfw=$(jj -i config.json enabled_nsfw)
|
||||
hide_reblogs=$(jj -i config.json hide_reblogs)
|
||||
max_statuses=$(jj -i config.json max_statuses)
|
||||
default_visibility=$(jj -i config.json default_visibility)
|
||||
default_content_type=$(jj -i config.json default_content_type)
|
||||
|
@ -317,20 +316,18 @@ status_api_one()
|
|||
|
||||
statuses_render()
|
||||
{
|
||||
if [ "$enabled_nsfw" = 'false' ]; then
|
||||
ids_massive=$(echo "$jsonmassive" | jj -l '#[sensitive=false]#.id' | delq)
|
||||
jsonmassive=$(echo "$jsonmassive" | jj '#[sensitive=false]#')
|
||||
fi
|
||||
if [ "$reversed_statuses" = 'true' ]; then
|
||||
ids_massive=$(echo "$ids_massive" | tr ' ' '\n' | tac | tr '\n' ' ')
|
||||
fi
|
||||
for i in $ids_massive; do
|
||||
status=$(echo "$jsonmassive" | jj "#[id=$i]")
|
||||
reblog=$(echo "$status" | jj reblog.id)
|
||||
if [ "$hide_reblogs" = 'true' ] && [ -n "$reblog" ]; then
|
||||
continue
|
||||
fi
|
||||
sensitive=$(echo "$status" | jj sensitive)
|
||||
if [ "$enabled_nsfw" = 'false' ] && [ "$sensitive" = 'true' ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
whoacct=$(echo "$status" | jj account.acct)
|
||||
reblog=$(echo "$status" | jj reblog.id)
|
||||
reblogacct=$(echo "$status" | jj reblog.account.acct)
|
||||
uri=$(echo "$status" | jj uri)
|
||||
id_status=$(echo "$status" | jj id)
|
||||
|
@ -350,9 +347,6 @@ statuses_render()
|
|||
if [ -n "$spoiler_text" ]; then
|
||||
echo "#[$spoiler_text]"
|
||||
fi
|
||||
if [ "$sensitive" = 'true' ]; then
|
||||
echo '[NSFW]'
|
||||
fi
|
||||
echo "$status" | jj -r content | delqse | html_to_txt_render
|
||||
attachments=$(echo "$status" | jj -l media_attachments.#.remote_url | delq)
|
||||
if [ -n "$attachments" ]; then
|
||||
|
|
Loading…
Reference in a new issue