Commit Graph
14 Commits
Author SHA1 Message Date
Pavel Liashkov 19702c95bd Add EPUB 3 nav.xhtml TOC support (#197)
## Summary

* **What is the goal of this PR?** Add EPUB 3 support by implementing
native navigation document (nav.xhtml) parsing with NCX fallback,
addressing issue Fixes: #143.

  * **What changes are included?**
- New `TocNavParser` for parsing EPUB 3 HTML5 navigation documents
(`<nav epub:type="toc">`)
- Detection of nav documents via `properties="nav"` attribute in OPF
manifest
- Fallback logic: try EPUB 3 nav first, fall back to NCX (EPUB 2) if
unavailable
- Graceful degradation: books without any TOC now load with a warning
instead of failing

  ## Additional Context

* The implementation follows the existing streaming XML parser pattern
using Expat to minimize RAM usage on the ESP32-C3
* EPUB 3 books that include both nav.xhtml and toc.ncx will prefer the
nav document (per EPUB 3 spec recommendation)
* No breaking changes - existing EPUB 2 books continue to work as before
* Tested on examples from
https://idpf.github.io/epub3-samples/30/samples.html
2026-01-03 19:10:35 +11:00
Dave Allie 7b65c2dc40 Update README.md features 2025-12-31 09:18:05 +11:00
Dave Allie 5b0c114c33 Consolidate chapter page data into single file (#144)
## Summary

* Consolidate chapter page data into single file
* Header structure of the file stays the same, following the page count,
we now put a LUT offset
   * The page data is all then appended to this file
* Finally the LUT is appended to the end of the file, and the page count
is updated
* This will also significantly improve the duration of cache cleanup
which takes a while to scan the directory and cleanup content
* Remove page file version as it's all tied up into the section file now
* Bumped section file version to 7
* Moved section content into sub directory
* Updated docs

## Additional Context

* Benchmarks:
  * Generating 74 pages of content from a chapter in Jade Legacy took:
    * master: 6,229ms
    * this PR: 1,305ms
    * Speedup of 79%
  * Generating 207 pages of content from Livesuit book:
    * With progress bar UI updates:
      * master: 24,250ms
      * this PR: 8,063ms
      * Speedup of 67%
    * Without progress bar UI updates:
      * master: 13,055ms
      * this PR: 3,600ms
      * Speedup of 72%
2025-12-29 13:19:54 +11:00
Dave Allie 3754af55c3 Update user guide 2025-12-20 01:44:39 +11:00
Dave Allie 458657c118 Add comparison images 2025-12-14 13:46:15 +11:00
Dave Allie 09aa1f4f2a Update contribution instructions 2025-12-14 13:46:03 +11:00
Dave Allie 7d643b7739 Add user guide 2025-12-13 21:52:03 +11:00
Dave Allie 0440576093 Restructure readme 2025-12-09 00:07:38 +11:00
Dave Allie 0b888a6502 Add section in readme on flashing via xteink.dve.al 2025-12-09 00:04:55 +11:00
Dave Allie 5b2177149f Add image to README 2025-12-06 13:32:09 +11:00
Dave Allie 1a2572d981 Update README.md with checkout instructions
Fixes https://github.com/daveallie/crosspoint-reader/issues/1
2025-12-06 04:53:58 +11:00
Dave Allie 5db2ac613b Update README.md features 2025-12-04 00:14:47 +11:00
Dave Allie fdedff1786 Add web flashing instructions 2025-12-03 22:21:11 +11:00
Dave Allie 9f5253313f Public release 2025-12-03 22:06:45 +11:00