View Single Post
Old 06-18-2018, 03:31 AM   #3
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Firstly, I do lots of highlighting for a similar purpose. I found the best way to do this was to highlight a few words around the problem word. I usually make sure the problem word is the first. And I might add an annotation to remind me of exactly what the problem is.

For location stored in the bookmarks table, it is a walk of the tags in the file the highlight is in. Each slash represents a tag level inside the file. For your example:
Code:
untitled.html#point(/1/2/1/6833/1/1:431)
The file first part is the file name in the epub.

The numbers work by counting tags. The first "1" is the "html". The "2" is the body ("head" then "body" within "html"). The next one probably means there is a div or something enclosing all the text. The 6833 is the count of tags within this. But, it is actually the count of opening and closing tags at this level. It means the highlight is within the 3412th open tag at this level, counting all headings, paragraphs, rules etc. Then there is another open tag of some sort, probably a span or some sort of emphasis tag. I'm not sure what 1 before the colon is, but the last number is where the highlight starts within the tag: the 431st character.

I might have one of the early levels wrong. It's been a while since I did this and I seem to remember something inconsistent in how one of these numbers worked. But the big number is correct and effectively means the 3412th paragraph but includes things that you might not normally consider paragraphs like headings and rules.

Not that's a pain and probably not worth doing anything with. I've done this manually to test how this works, but stuck to the beginning of the file. I kept losing count.

But, that's not what you want to do. What might work for you is Toxaris's Kobo annotation exporter. It has been a while since I last used it, but my memory is that it extracts the surrounding text when getting the annotations and highlights that in the file it produces. I don't know if it still works with recent Kobo firmware. That will depend on what SQLite library it uses.

There are a number of other ways to get the annotations from the Kobo devices. I can't remember if any of the others will get the context. The calibre Annotations plugin definitely doesn't, nor the export that can be enabled on the device.
davidfor is offline   Reply With Quote