Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-01-2019, 03:27 PM   #1
Rapunzel
Junior Member
Rapunzel began at the beginning.
 
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)"
The :61 appears to refer to the character position in a line, but I don't know what the /1/4/230/ part means. It's definitely not a line number: the file I took this example from doesn't even have 230 lines.

Any pointers?
Rapunzel is offline   Reply With Quote
Old 05-02-2019, 10:57 AM   #2
Rapunzel
Junior Member
Rapunzel began at the beginning.
 
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.
Rapunzel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle: Cover and title links in fly out TOC menu both point to the cover page Swifty4635 Conversion 1 03-11-2019 11:15 AM
TOC links point to wrong page! fluoresce ePub 12 05-24-2017 08:07 AM
links and annotations jojoba Marvin 3 12-09-2015 12:04 PM
Annotations: Capture/Convert Kobo-Kindle (uses OpenWith and Annotations Plugins) EnergyLens Related Tools 11 11-11-2014 12:42 AM
The Economist: "See article" links point to web ugumba Recipes 4 06-26-2012 12:35 AM


All times are GMT -4. The time now is 11:22 PM.


MobileRead.com is a privately owned, operated and funded community.