View Single Post
Old 06-19-2011, 10:27 AM   #110
kiwidude
calibre/Sigil 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,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@capnm - thanks for sending me the epub.

The problem is caused by the mimetype of the ncx file - it is set to "text/xml" rather than something more conventional like "application/x-dtbncx+xml".

To fix this requires a change to the Calibre code.
ebooks.epub.fix.container.py - line 181 - currently just looks for mt.endswith('+xml')

To be honest I may give up on using the Calibre class - I already override half the functions in it anyway to either "fix" things to the requirements for this plugin or add functionality. That would allow the plugin to be changed independently of the Calibre source.

@Idolse - thx for your post. I think I would probably go down the text replacement route to minimise the impact on the CSS file, should just be a case of figuring out an appropriate regex to use.
kiwidude is offline   Reply With Quote