View Single Post
Old 08-07-2021, 10:16 AM   #3
fmagin
Junior Member
fmagin began at the beginning.
 
fmagin's Avatar
 
Posts: 2
Karma: 10
Join Date: Aug 2021
Device: reMarkable 1
Thanks, this covers the initial problem!

The hurdle I am encountering now is properly getting the exact location as Calibre expects it. E.g. in Calibre the JSON annotation data looks like this:


Quote:
{
"end_cfi": "/2/4/56/1:250",
"highlighted_text": "frontal lobes represent about 7 per cent of the total brain volume of a relatively intelligent animal such as the dog, and take up about 17 per cent of the brain in the lesser apes, they represent as much as 35 per cent of the human brain",
"spine_index": 10,
"spine_name": "OPS/chapter_01.htm",
"start_cfi": "/2/4/56/1:12",
"style": {
"kind": "color",
"type": "builtin",
"which": "yellow"
},
"timestamp": "2021-08-06T15:39:28.644Z",
"toc_family_titles": [
"Part One The Divided Brain",
"Chapter 1 Asymmetry and the Brain"
],
"type": "highlight",
"uuid": "ffT8yQAnoxs0oSoXBXdK6w"
},


I need to somehow get the location info from just the text "frontal lobes [...] of the human brain" or ideally a regex, like the epub viewer allows via the search function + highlight creation. Is there some API to achieve this without a GUI, or is this too deeply intertwined with the GUI code?
fmagin is offline   Reply With Quote