05-01-2022, 05:58 PM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Feb 2022
Device: onyx boox note air
|
How to access TOC?
I'm writing a plugin for exporting annotations as JSON but I noticed that some of my annotations are missing the chapter data.
Is there a way to access a book's TOC from the book_id? I'd need to access to TOC either in a subclass of the USBReader class or the Export class. Follow up question: is there a method on the toc model for getting a chapter title from a page number? |
05-01-2022, 09:53 PM | #2 |
creator of calibre
Posts: 43,976
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no (simple) api for accessing tocs. In general you would use the polish container class with an epub or azw3 book to get tocs.
And none whatsoever for getting titles from page numbers (page numbers are very ill defined things). ToC information when available is automatically added to annotations when they are creted. If it isnt there, it means it was not available. |
05-02-2022, 01:54 AM | #3 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Feb 2022
Device: onyx boox note air
|
Quote:
|
|
05-02-2022, 04:23 AM | #4 |
creator of calibre
Posts: 43,976
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Glo Quick method to access TOC ?. | leftright | Kobo Reader | 17 | 07-30-2014 06:30 AM |
One-click access to the metadata TOC | PatNY | Sony Reader | 0 | 01-21-2011 06:47 PM |
Kobo Firmware Access and Early Access Program | PeterT | Kobo Reader | 115 | 08-09-2010 08:06 PM |
pocketbook 360...access epub toc and zoom tables? | extendedping | PocketBook | 3 | 07-28-2010 12:18 PM |
pocketbook 360...access epub toc and zoom tables? | extendedping | PocketBook | 8 | 07-27-2010 01:47 PM |