From 43aff367bf42f56ea606be7a61673ae65a2e625b Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Sun, 1 Sep 2024 17:06:55 +0200 Subject: [PATCH] new: [test] convert my paperbay.org account into an archive --- test/download.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/download.sh diff --git a/test/download.sh b/test/download.sh new file mode 100644 index 0000000..6860058 --- /dev/null +++ b/test/download.sh @@ -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 +