05-01-2019, 04:27 PM | #1 |
Junior Member
Posts: 5
Karma: 10
Join Date: Nov 2018
Location: Wisconsin
Device: PocketBook Touch Lux 3
|
How to parse the #point links in annotations?
I have a PocketBook Touch Lux 3 where annotations are stored in html files in /system/config/Active Contents. There are position and endposition properties that obviously refer to locations within the html files of the epub, but I haven't been able to interpret them.
For example, Code:
position="OEBPS/Text/chapter01.html#point(/1/4/230/1:61)" Any pointers? |
05-02-2019, 11:57 AM | #2 |
Junior Member
Posts: 5
Karma: 10
Join Date: Nov 2018
Location: Wisconsin
Device: PocketBook Touch Lux 3
|
I believe I found the answer to my own question. This thread which refers to this thread which refers to this page clued me in.
I'll try to summarize it accurately here, in case those links die. My PocketBook reader links to annotations like this: #point(/1/4/162/1:3), for example. The numbers represent the node tree and the nth child of the parent node, counting whitespace between nodes as a node itself. That's the part I'd probably never have guessed on my own. So in my example, / is the root, 1 is the first node (html), 4 is the 4th child of that node (whitespace, <head>, whitespace, <body>), 162 is the 162nd child of that node, 1 is the first child (which is just text) of that <p> node, and 3 is the character position. I'll need to throw together a mockup epub with some more or less complicated examples so I can see how it handles highlighting across paragraphs or <span> tags within <p> tags, but I think I have a handle on it now. The use case, if anyone was wondering, is I use annotations to mark obvious text errors in sloppily digitized ebooks so I can go back and fix them later. If I had a Sigil plugin that could parse the annotations file and jump to the relevant points in the book, I'd be able to streamline the process quite a bit. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Annotations: Capture/Convert Kobo-Kindle (uses OpenWith and Annotations Plugins) | EnergyLens | Related Tools | 12 | 03-28-2020 02:04 PM |
Kindle: Cover and title links in fly out TOC menu both point to the cover page | Swifty4635 | Conversion | 1 | 03-11-2019 12:15 PM |
TOC links point to wrong page! | fluoresce | ePub | 12 | 05-24-2017 09:07 AM |
links and annotations | jojoba | Marvin | 3 | 12-09-2015 01:04 PM |
The Economist: "See article" links point to web | ugumba | Recipes | 4 | 06-26-2012 01:35 AM |