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:
@@ -19,13 +19,7 @@ struct CrossPointPosition {
|
||||
char xpathAnchorId[64] = {}; // First <a id> captured inside the matched XPath element
|
||||
};
|
||||
|
||||
/**
|
||||
* Progress position representation.
|
||||
*/
|
||||
struct SavedProgressPosition {
|
||||
std::string xpath; // XPath-like progress string
|
||||
float percentage; // Progress percentage (0.0 to 1.0)
|
||||
};
|
||||
#include "KOReaderPosition.h" // SavedProgressPosition
|
||||
|
||||
/**
|
||||
* Maps between CrossPoint and SavedProgress position formats, such as those used by KOReader.
|
||||
|
||||
Reference in New Issue
Block a user