Commit Graph
17 Commits
Author SHA1 Message Date
jpirnay 12ad974dc7 Address /text()[N].M cases 2026-03-31 12:58:00 +02:00
jpirnay 08f05b7a5b Fix br.0 indexing issue 2026-03-28 11:04:01 +01:00
jpirnayandClaude Opus 4.6 fd70b3a231 Add paragraph index LUT for accurate KOReader position sync
Store per-page paragraph indices in section cache to enable precise
XPath-to-page and page-to-XPath mapping without reparsing XHTML.

Forward path (upload): generates XPath directly from paragraph LUT
instead of byte-offset estimation, eliminating drift in chapters
with non-uniform content density.

Reverse path (download): resolves incoming KOReader XPath p[N] to
the exact page via paragraph LUT lookup.

Paragraph counter counts all <p> elements including display:none
to match ChapterXPathIndexer and crengine's standard XPath counting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 12:29:30 +01:00
jpirnay 5b710e960f Fix OOM 2026-03-21 20:04:03 +01:00
jpirnay beeea38721 Remove cache - caused OOM in certain scenarios 2026-03-21 09:04:03 +01:00
jpirnay 14d1c14137 Fix xpath case issue 2026-03-20 11:12:19 +01:00
jpirnay 5dec3d7f95 Reuse spine 2026-03-20 09:43:26 +01:00
jpirnay 913c24407b case fix 2026-03-19 16:43:34 +01:00
jpirnay 6deca2b78f Use temp file approach 2026-03-19 16:28:29 +01:00
jpirnay 3aa5c1b0de Reduce memory usage for parseSpineItem 2026-03-19 13:43:21 +01:00
jpirnay f859169dde Function combination 2026-02-28 05:46:46 +01:00
jpirnay 8c08c19ca6 Review comments 2026-02-28 05:31:12 +01:00
jpirnay 5e62dd79cd Fix comparison 2026-02-27 11:09:42 +01:00
jpirnay 9a4c9baf85 Additional debug information 2026-02-27 10:20:32 +01:00
jpirnay 34586d0010 Fix faulty 0 based docfragment 2026-02-27 09:51:53 +01:00
jpirnay c335e027b4 Update docs 2026-02-25 22:44:08 +01:00
jpirnay 7e8bd70f3c First attempt for proper koreader xpath generation / resolution 2026-02-25 22:34:11 +01:00