Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 11-18-2012, 05:34 AM   #1
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: 5,891
Karma: 5704423
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo Touch, Kobo Glo
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?
davidfor is offline   Reply With Quote
Old 11-18-2012, 12:13 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,327
Karma: 5382313
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.
kovidgoyal is online now   Reply With Quote
 
Advertisement
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 10:08 AM.


MobileRead.com is a privately owned, operated and funded community.