mirror of
https://github.com/adulau/mastodon-markdown-archive.git
synced 2024-10-09 15:51:44 +00:00
13 lines
473 B
Bash
13 lines
473 B
Bash
#!/bin/bash
|
|
|
|
while true; do
|
|
command="./mastodon-markdown-archive --template=../files/templates/foo.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
|
|
|