mirror of
https://github.com/adulau/mastodon-markdown-archive.git
synced 2024-10-09 15:51:44 +00:00
14 lines
474 B
Bash
14 lines
474 B
Bash
|
#!/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
|
||
|
|