diff --git a/pleroma-cli.sh b/pleroma-cli.sh index 240173e..43ff125 100755 --- a/pleroma-cli.sh +++ b/pleroma-cli.sh @@ -151,14 +151,14 @@ follow_api_export() echo "$acc_following_count followings exported" elif [ $count -lt 40 ]; then countindex=$(expr $count - 1) - echo $followings | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/friends.csv + echo $followings | jj -l \#.acct | delq | legacy_addr_preprocess >> backups_$instance/friends.csv offset=$(echo $followings | jj $countindex.id) echo "+$count follows" count=0 echo "$acc_following_count followings exported" elif [ $count -gt 0 ]; then countindex=$(expr $count - 1) - echo $followings | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/friends.csv + echo $followings | jj -l \#.acct | delq | legacy_addr_preprocess >> backups_$instance/friends.csv offset=$(echo $followings | jj $countindex.id) echo "+$count follows" fi @@ -177,13 +177,13 @@ blocks_api_export() echo "Blocks exported" elif [ $count -lt 40 ]; then countindex=$(expr $count - 1) - echo $blocks | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/blocks.csv + echo $blocks | jj -l \#.acct | delq | legacy_addr_preprocess >> backups_$instance/blocks.csv offset=$(echo $blocks | jj $countindex.id) echo "+$count blocks" count=0 echo "Blocks exported" elif [ $count -gt 0 ]; then - echo $blocks | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/blocks.csv + echo $blocks | jj -l \#.acct | delq | legacy_addr_preprocess >> backups_$instance/blocks.csv offset=$(echo $blocks | jj $countindex.id) echo "+$count blocks" fi @@ -202,13 +202,13 @@ mutes_api_export() echo "Mutes exported" elif [ $count -lt 40 ]; then countindex=$(expr $count - 1) - echo $mutes | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/mutes.csv + echo $mutes | jj -l \#.acct | delq | legacy_addr_preprocess >> backups_$instance/mutes.csv offset=$(echo $mutes | jj $countindex.id) echo "+$count mutes" count=0 echo "Mutes exported" elif [ $count -gt 0 ]; then - echo $mutes | jj -l \#.acct | sed 's/"//g' | legacy_addr_preprocess >> backups_$instance/mutes.csv + echo $mutes | jj -l \#.acct | delq| legacy_addr_preprocess >> backups_$instance/mutes.csv offset=$(echo $mutes | jj $countindex.id) echo "+$count mutes" fi @@ -260,6 +260,21 @@ thread_api_statuses() default_curl_opt "$instance_point/statuses/$1/context" } +html_to_txt_render() +{ + sed -e "s/]*>/\n/g ; s/]*>/\n/g ; s/<[^>]*>//g ; s/>*/>/g ; s/<*/]*>/\n/g - ; s/]*>/\n/g ; s/<[^>]*>//g - ; s/>*/>/g ; s/<*/> attachments.m3u8 echo "$attachments" >> attachments.m3u8 @@ -321,7 +334,7 @@ timeline_menu() while [ $sub_menu_lvl -eq 1 ]; do while [ $indexator -gt 0 ]; do - status=$(echo $json | jj $indexator) + status=$(echo "$json" | jj $indexator) reblog=$(echo $status | jj reblog) uri=$(echo $status | jj uri) id_status=$(echo $status | jj id) @@ -334,9 +347,11 @@ timeline_menu() if [ -n "$reblog" ]; then echo "$boost_symbol" fi - echo $status | jj content | sed -e "s/]*>/\n/g - ; s/]*>/\n/g ; s/<[^>]*>//g - ; s/>*/>/g ; s/<*/> attachments.m3u8