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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user