Quote:
calibre's epubcfi support was added long before that spec existed
|
Ah, I see. Ok, so currently my algorithm is:
for example, given this identifier "#epubcfi(/6/68!/4/2/2/152/1:160)"
- remove `/6`
- remove `/68!, convertt it (x/2 -1) to 33 and store as `spine_index`
- add extra `/2` to the begining
- at this point i think result is what I need, though sometimes offsets (:160) missmatch, I'm still investigating this part, but I think the issue is because book on reader had another structure (the book itself is deleted though I can link it to the one in calibre library using some metadata)
Btw, looked at the code and now I'm almost sure it is correct algo. Another question is, are there any plans to support epubcfi? I think I could help with that, but I'm very new to calibre source code