View Single Post
Old 12-05-2014, 11:49 AM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,859
Karma: 6120478
Join Date: Nov 2009
Device: many
Hi Toxaris,

If you truly feel this type of output file is needed, I would be happy to take a stab at it when I get some free time. The code in Calibre that user-none wrote is very easy to follow. But as far as I know, nothing except for calibre even knows what a htmlz file is or how to play with it.

Also in calibre there are at least 3 different ways that styles are handled depending on calibre preferences:

1. remove as many as possible and replace with simple html tags whereever possible
and leave the rest as inline styles

2. convert all to styles in the head of the document, getting rid of any external css

3. convert all to external css, remove all in-line styles.

All of these approaches are fraught with problems if separate html pages end up being merged into one big html file because as separate xhtml files they might easily import from different css stylesheets that have conflicting definitions.

So it may not be a lossless process at all.

But before I start on something like this, I would love to know what else uses htmlz and how? If it is only calibre, then simply loading it into calibre and running its htmlz conversion would probably be for the best. It would in fact be easy to write an output plugin to Sigil that hands the book off to calibre (if calibre is installed on your system) or that invokes calibre's nice ebook-convert tools from the command line to convert to anything that calibre supports.

Perhaps a plugin like that would be more useful?

Take care,

KevinH
KevinH is offline   Reply With Quote