View Single Post
Old 05-29-2012, 07:22 AM   #296
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,733
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@JSWolf - Ok, for the next version (not uploaded yet) I have changed it to attempt to put the generated cover image and titlepage into the appropriate subfolders if they exist in the epub. If the epub has no images it is going to put it in the root folder like it does currently - I don't want to artifically create a hierarchy by adding an images subfolder in case the epub had been intentionally "flattened" in the first place (since that is one of calibre's conversion options and was presumably created to support some device or something).

I have also added logic to ensure that if there is an *inline* TOC html page in the ePub with an entry pointing to the old cover html page, that it will be updated if that old cover page gets removed and the replacement has a different link required. I hadn't done this previously because (a) it means re-writing the html page and (b) I was being lazy, but it is the "right" thing to do.

With regards to the NCX - without seeing your example ePub I started experimenting to try to guess what had gone wrong. The one thing I have found was that if the .ncx is in a different folder to the .opf manifest then things do go a bit wrong. Even calibre gets that particular use case wrong as well during a conversion (Kovid may spot this, otherwise I'll raise a bug report tonight). Perhaps that was the issue with your ePub - regardless if you can send me a link to it to replicate it would be much appreciated.
kiwidude is offline   Reply With Quote