Commit Graph

14 Commits

Author SHA1 Message Date
Audiobook Producer 568bf7749e warnings.log: one line per entry; longer OCR error text 2026-10-18 01:57:44 -05:00
Audiobook Producer 9e8d902547 Workflow: pdf input defaults to empty (dry run falls back to the Clark regression sample) 2026-10-18 01:53:37 -05:00
Audiobook Producer 52104b30b9 Install ghostscript fonts (urw-base35) for OCR of PDFs with non-embedded fonts; fuller OCR error text 2026-10-18 01:53:13 -05:00
Audiobook Producer a8ea105b4c process: show the OCR failure reason in the error 2026-10-18 01:50:39 -05:00
Audiobook Producer 9cba035adc process: keep the original run.log when a re-run renders nothing; dispatch input to override the voice URL (testing); drop netcheck 2026-10-18 01:50:11 -05:00
Audiobook Producer 153153010e Workflow: sparse partial checkout (code and _incoming only), book lookup before processing, safe rebase retry; revert cancel-in-progress 2026-10-18 01:48:48 -05:00
Audiobook Producer bbc99e9df6 Add _incoming/README.md and record the drop-folder decision in REQUIREMENTS 2026-10-18 01:34:58 -05:00
Audiobook Producer 53d21ea2e5 Add Gitea Actions workflow: _incoming/*.pdf drop-folder pipeline, with dry-run dispatch 2026-10-18 01:34:58 -05:00
Audiobook Producer 8c9ea14568 Add 'process': one command for a whole book (all chapters), idempotent, loud failures, OCR required; synthetic test-PDF tool 2026-10-18 01:34:58 -05:00
Audiobook Producer 460d4648cb Pipeline: env overrides for endpoints and dirs; voice health check, retries, load-on-demand; refuse speed_factor 2026-10-18 01:34:58 -05:00
Audiobook Producer 7f0b598441 Fix paragraph breaks, drop caps, headers and captions for chapters 2-6 of the Clark book
Root cause: clean-up found paragraph breaks from the layout indent of pdftotext -layout
(columns, relative to the smallest indent in the whole chapter). Chapter 1 happened to
have a clean left margin; later pages are skewed and drift 1-2 columns, drop caps push
the first lines right by varying amounts, and some pages wrap text around a label, so
continuation lines were taken as paragraph starts (a blank line inside a sentence).

Fix (all deterministic, all logged to warnings.log):
- pdftext: read each line's position in points (pdftotext -bbox-layout) and attach it to
  the layout line it belongs to (units() now carries 'geom'; merged/partial lines get none).
- cleanup: a paragraph starts when a line sits >= 4.5 pt right of the line before it, or
  >= 2.5 pt lower than the page's normal line pitch. A line without a position or starting
  in lower case never starts a paragraph. Text wrapped beside a drop cap is not a start.
  Without positions the old indent rule is still used.
- cleanup: drop cap + small caps on ONE layout line ('F     OR MANY YEARS') is repaired like
  the two-line form (chapters 4 and 5).
- pageparts.header_zone: the running header is found even when text follows it without a
  blank line, and the right-hand header (chapter title, page number sometimes misread as
  't5' or 'a') is recognised from the chapter title.
- cleanup: all-capitals lines below the text are captions (removed); an all-capitals line
  above the text is kept as a section heading in title case ('The Deferred Preface');
  'Right: MARK TWIN' style captions removed; '5. JOY' labels set inside a sentence removed.
- cleanup: paragraph starting with a lone quote mark + lower-case word joins the paragraph
  before it; paragraph-leading ' + capital becomes '"' (not elisions such as 'Tis); a bullet
  in place of an opening quote becomes '"'; closing quote with no opening quote, and a '1'
  that is probably the letter I, are logged only.
- cleanup: mid-line 'worth- while' joined only when certain, otherwise logged.
- tests: new _pipeline/tests/test_cleanup.py (36 tests, 27 fail on the previous code);
  test_pipeline.py helper test_piece renamed make_test_piece so pytest stops collecting it.

Chapter 1 text is byte-identical to the approved pilot text.
Re-run for chapters 1-6: cleanup, figures, script, license. Text, script, warnings and
book.json for chapters 2-6 added.
2026-10-17 17:07:52 -05:00
Audiobook Producer ca5592b964 Lock MVP voice (Michael, native settings); native /tts route 2026-10-17 16:44:28 -05:00
Grok Bot 444cee7f76 Add requirements 2026-10-17 15:27:14 -05:00
Grok Bot 5f0e2a9768 Add pipeline code 2026-10-17 15:27:14 -05:00