Structure: tolerate OCR-damaged CHAPTER numerals, drop contents-page entries, one synthetic chapter when a book has no headings; metadata: OCR at 300 dpi, title-page text logged, OCR-read author flagged

This commit is contained in:
Audiobook Producer
2026-10-18 13:34:38 -05:00
parent b0b8050b0c
commit 2e33a24ea3
5 changed files with 114 additions and 11 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ def unit_lines(unit, title, heading, first_unit, notes):
if f:
drop.add(f[0])
notes.append(("page-number-removed", where, "footer page number %d" % f[1]))
if first_unit and heading:
if first_unit and heading and not heading.get("synthetic"):
drop.update(range(0, heading["title_end"]))
notes.append(("heading-removed", where, "chapter heading 'CHAPTER %d / %s' (spoken header is added in the script)" % (heading["number"], heading["title"])))
# last line of running text: the lines after it (all capitals only) are picture captions, not headings