Extracts book_parser.py from book_handler.py

Extracts out a BaseBookParser, PDFParser and MarkdownParser class from book_handler logic

The basic contract is that the parser classes populate 4 attributes that are used by the book_handler logic
- content_texts
- content_lengths
- book_metatdata
- processed_nav_structures (used by the method get_chapters on the BaseBookParser class)

Adds tests to validate the changes as well in tests/
Run tests from the abogen dir as follows

```bash
python -m unittest discover
```
This commit is contained in:
Mohan Krishnan
2025-12-22 13:32:40 +08:00
parent 1c33a99554
commit 1fdd1c8540
11 changed files with 2194 additions and 1002 deletions
View File