|
|
#1 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Getting the TOC from an ePub
For something I am trying with the Kobo driver, I need to retrieve the TOC from ePubs. I first look at this earlier in the year and have implemented something using calibre.ebooks.oeb.iterator. It works, but I am wondering if there is another way.
What I need is the TOC entry with the title and the path for the link. Is there a best way to get this? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,659
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look at metadata/epub.py that will show you how to get the parsed OPF from an epub easily. IIRC the opf object has a .toc attribute you can use to access the toc.
|
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with ePub 3 TOC | mynock70 | ePub | 4 | 11-20-2012 04:14 PM |
| Multi-level TOC broken in epub->epub conversion | siebert | Conversion | 14 | 03-09-2011 06:38 PM |
| ePub TOC to mobi TOC | edmnddntes | Conversion | 5 | 01-24-2011 03:56 AM |
| Epub to Epub loses TOC | edbro | Calibre | 6 | 10-12-2010 05:24 PM |
| epub TOC | crutledge | ePub | 2 | 02-14-2010 05:57 PM |