Workflow: pdf input defaults to empty (dry run falls back to the Clark regression sample)

This commit is contained in:
Audiobook Producer
2026-10-18 01:53:37 -05:00
parent 52104b30b9
commit 9e8d902547
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -24,6 +24,12 @@ if [ -n "${PDF_INPUT:-}" ]; then
else
while IFS= read -r f; do pdfs+=("$f"); done < <(find _incoming -maxdepth 1 -type f -iname '*.pdf' | sort)
fi
CLARK_PDF="books/clark-glenn/the-man-who-tapped-the-secrets-of-the-universe/The Man Who Tapped the Secrets of the Universe - by Glenn Clark (Walter Russell).pdf"
if [ "${#pdfs[@]}" -eq 0 ] && [ "$DRY_RUN" = "true" ]; then
echo "Dry run with nothing in _incoming/: using the Clark book as a regression sample."
sparse_add "/$(esc "$CLARK_PDF")"
pdfs=("$CLARK_PDF")
fi
if [ "${#pdfs[@]}" -eq 0 ]; then
echo "Nothing to do: no PDF in _incoming/."
exit 0