From 9e8d90254711419a8de494fec34e95c405d39965 Mon Sep 17 00:00:00 2001 From: Audiobook Producer Date: Sun, 18 Oct 2026 01:53:37 -0500 Subject: [PATCH] Workflow: pdf input defaults to empty (dry run falls back to the Clark regression sample) --- .gitea/workflows/audiobook.yml | 4 ++-- _pipeline/ci/run.sh | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/audiobook.yml b/.gitea/workflows/audiobook.yml index 1904162..3a87442 100644 --- a/.gitea/workflows/audiobook.yml +++ b/.gitea/workflows/audiobook.yml @@ -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 diff --git a/_pipeline/ci/run.sh b/_pipeline/ci/run.sh index 274ebf8..d46d05d 100755 --- a/_pipeline/ci/run.sh +++ b/_pipeline/ci/run.sh @@ -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