View Single Post
Old 01-03-2009, 01:58 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: 45,580
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can't in an automated way. You'd have to unzip the epub file and edit the ncx file within it by hand. Alternatively (though I haven't tried this to see how well it works) You can create hierarchical HTML table of contents.

So

toc1.html - list of books linksto toc2.html in each book

In each book,

toc2.html - list of parts links to toc3.html in each part

and so on

then run

any2epub on toc1.html with the options

--max-toc-links=1000 --no-chapters-in-toc

This will likely have all the links in your TOC files, but there will be some extra links. Just unzip the epub file (or use --extract-to) and edit the NCX file, simple deleting unwanted links.
kovidgoyal is offline   Reply With Quote