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
+2 -2
View File
@@ -9,9 +9,9 @@ on:
workflow_dispatch:
inputs:
pdf:
description: 'PDF path inside the repo (empty = every PDF waiting in _incoming/)'
description: 'PDF path inside the repo (empty = every PDF waiting in _incoming/; a dry run with nothing waiting uses the Clark book as a regression sample)'
required: false
default: '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'
default: ''
voice_endpoint:
description: 'Testing only: use this voice URL instead of the default (for example to prove a failed voice run commits nothing)'
required: false
+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