mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-19 04:39:14 +00:00
15 lines
409 B
Bash
Executable file
15 lines
409 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# convert statuses as files and dirs
|
|
json="$(cat)"
|
|
ids=$(echo "$json" | jj -l '#.id' | sed 's/"//g')
|
|
for i in $ids; do
|
|
if [ -f "$main_basedir"/statuses/$i.json ]; then
|
|
continue
|
|
fi
|
|
mkdir -m 711 -p "$main_basedir"/statuses/$i
|
|
echo "$json" | jj -p "#[id=$i]" > "$main_basedir"/statuses/$i/$i.json
|
|
chmod 600 "$main_basedir"/statuses/$i/$i.json
|
|
done
|
|
"$main_basedir"/utils/extract_text_content.sh
|