Replies: 2 comments 4 replies
-
What's CFI? |
Beta Was this translation helpful? Give feedback.
-
Nope, there is no existing support to anything CFI in KOReader and its EPUB engine (crengine). About CFI: http://idpf.org/epub/linking/cfi/ (dunno if it's the most recent spec) And I don't even think you can convert from outside a xpointer to CFI (because it has indices by elements, You would need to add support for CFI in crengine itself (C++ code): from the DOM node and the DOM, I guess it would be possible to return a simple CFI with just indices. The reverse (any form/kind of CFI) to node might be harder... |
Beta Was this translation helpful? Give feedback.
-
Hi! I've been working on a side project that is looking to emulate some of the functionality of Amazon's "Whipser Sync for Voice" (syncing progress between audible audiobooks and kindle ebooks).
Currently, I'm able to arbitrarily update the progress/location of an ebook through a self hosted instance of koreader-sync and KOReader. The next step I'm working through is writing a service that parses through an epub for a given substring, and then uses koreader-sync to update the progress based on the location of that text.
The problem I'm running in to is all of the libraries I've found for interacting with epub all return text location as CFI, while KOReader is using Xpointer. I was wondering if anyone had any guidance on ways to convert between the two of these? Or if there is a way to get KOReader to support CFI through koreader-sync that I've possibly missed? Or even better yet, if anyone knows of a library / way to get an Xpointer location directly from an epub in some sort of automatable way?
Beta Was this translation helpful? Give feedback.
All reactions