View Single Post
Old 01-03-2009, 02:14 PM   #3
mtravellerh
book creator
mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.mtravellerh ought to be getting tired of karma fortunes by now.
 
mtravellerh's Avatar
 
Posts: 9,657
Karma: 3856660
Join Date: Oct 2008
Location: Luxembourg
Device: Kindle Scribe
Quote:
Originally Posted by kovidgoyal View Post
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.
Thanks

Wouldn't the easiest way be to make the third and fourth level flat and then edit the NCX file by hand like you suggested? Good idea btw.
mtravellerh is offline   Reply With Quote