mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-21 22:51:28 +00:00
Added quoting reply mode; change write status menu behaviour
This commit is contained in:
parent
49119c1d64
commit
e928d6f23a
|
@ -6,6 +6,7 @@
|
|||
"format_time": "+%d.%m.%Y %H:%M:%S",
|
||||
"boost_symbol": "[>>]",
|
||||
"reversed_statuses": false,
|
||||
"quoting_reply": true,
|
||||
"public_list_instances": [
|
||||
"outerheaven.club",
|
||||
"stereophonic.space",
|
||||
|
|
|
@ -11,6 +11,7 @@ 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)
|
||||
reversed_statuses=$(jj -i config.json reversed_statuses)
|
||||
quoting_reply=$(jj -i config.json quoting_reply)
|
||||
|
||||
#[AUTH SECTION]
|
||||
mkdir -m 711 -p .app_sessions
|
||||
|
@ -301,7 +302,12 @@ delqse()
|
|||
|
||||
statuses_api_account()
|
||||
{
|
||||
default_curl_opt "accounts/$1/statuses?limit=$max_statuses"
|
||||
default_curl_opt "$instance_point/accounts/$1/statuses?limit=$max_statuses"
|
||||
}
|
||||
|
||||
status_api_one()
|
||||
{
|
||||
default_curl_opt "$instance_point/statuses/$1"
|
||||
}
|
||||
|
||||
statuses_render()
|
||||
|
@ -395,8 +401,11 @@ timeline_menu()
|
|||
"Reply")
|
||||
echo 'Input id'
|
||||
read status_id
|
||||
if [ "$quoting_reply" = 'true' ]; then
|
||||
status_api_one $status_id | jj content | html_to_txt_render | sed 's/^/> /' > tmp_status.md
|
||||
fi
|
||||
write_status_menu $status_id
|
||||
indexator=$(expr $max_statuses - 1)
|
||||
|
||||
;;
|
||||
"Share")
|
||||
echo 'Input id (s - stop)'
|
||||
|
@ -507,9 +516,9 @@ write_status_menu()
|
|||
if [ -n "$http_code" ]; then
|
||||
echo "Send state: $http_code"
|
||||
fi
|
||||
wrirepostmenu=$(echo "Write\nSend\nAdd attach\nChange type\nVisiblity\nBack\nMain menu" | fzy)
|
||||
wrirepostmenu=$(echo "Edit\nSend\nAdd attach\nChange type\nVisiblity\nReset\nBack\nMain menu" | fzy)
|
||||
case $wrirepostmenu in
|
||||
"Write") echo > tmp_status.md; $EDITOR tmp_status.md ;;
|
||||
"Edit") $EDITOR tmp_status.md ;;
|
||||
"Send") http_code=$(write_api_status "$(cat tmp_status.md)") ;;
|
||||
"Add attach")
|
||||
echo 'Input path to attach (ex. @image.png or @/full/path/to/attach.png)'
|
||||
|
@ -519,6 +528,7 @@ write_status_menu()
|
|||
"Visiblity")
|
||||
status_visibility=$(echo 'public\nunlisted\nlocal\nprivate\ndirect\nlist' | fzy)
|
||||
;;
|
||||
"Reset") echo > tmp_status.md ;;
|
||||
"Back") sub_menu_lvl=$(expr $level - 1) ;;
|
||||
"Main menu") sub_menu_lvl=0 ;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue