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
+2
View File
@@ -87,6 +87,8 @@ class MetaTests(unittest.TestCase):
self.assertEqual((m["title"], m["author"]), ("Science of Breath", "Yogi Ramacharaka"))
self.assertIn("first-page-ocr", m["author_source"])
self.assertIn("first-page-ocr", m["title_source"])
self.assertTrue(any("read by OCR" in w[2] for w in m["warnings"]))
self.assertTrue(any("title page text:" in line for line in m["log"]))
meta.resolve(self.cfg, p)
self.assertEqual(len(calls), 1, "the detection from the PDF is cached")