Add KOReader XPath sync support for EPUB navigation

Implements bidirectional conversion between KOReader XPath positions and FreeInkBook character offsets. Uses streaming SAX parsing to match chapter text accounting with ChapterLayout, enabling position sync without requiring DOM or pagination. Handles element ancestry tracking, text offset calculation, and spine index extraction.
This commit is contained in:
Justin Mitchell committed 2026-07-08 01:11:29 -04:00
1 parent 3421171670
commit d364e54a69
13 files changed
+744 -63

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
#pragma once
// Host-test shim for the firmware Logging.h (which drags in Arduino Serial).
#include <cstdio>
#define LOG_DBG(tag, ...) (std::printf("[%s] ", tag), std::printf(__VA_ARGS__), std::printf("\n"))
#define LOG_INF(tag, ...) (std::printf("[%s] ", tag), std::printf(__VA_ARGS__), std::printf("\n"))
#define LOG_ERR(tag, ...) (std::printf("[%s] ", tag), std::printf(__VA_ARGS__), std::printf("\n"))