new: [test] convert my paperbay.org account into an archive

This commit is contained in:
Alexandre Dulaunoy 2024-09-01 17:06:55 +02:00
parent fc4484b10d
commit 43aff367bf
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

13
test/download.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
while true; do
command="./mastodon-markdown-archive --template=../files/templates/post.tmpl --user=https://paperbay.org/@a --dist=./posts --persist-last=./last --max-id=$(test -f ./last && cat ./last || echo "") --download-media=./posts --porcelain=true --threaded=true"
output=$($command)
if [[ "$output" -eq 0 ]]; then
echo "No posts returned. Exiting"
break
fi
echo "Fetched $output posts. Continuing."
sleep 1
done