Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-25-2016, 10:49 PM   #1
JulienDym
Junior Member
JulienDym began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2011
Device: Kobo, Sony Touch Edition
Converting from ePUB to HTMLZ with Calibre

When converting from ePUB to HTMLZ, is there a way to avoid having Calibre insert all these calibre class tags in the CSS? Is there a way to convert to HTMLZ without making any changes to the existing tags and CSS...?

Thank much
JulienDym is offline   Reply With Quote
Old 02-25-2016, 11:13 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
No, calibre's automated conversion pipeline will automatically "flatten" the CSS.

Why are you converting to HTMLZ anyway, though?
eschwartz is offline   Reply With Quote
Advert
Old 02-25-2016, 11:48 PM   #3
JulienDym
Junior Member
JulienDym began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2011
Device: Kobo, Sony Touch Edition
I wanted to use Calibre's conversion to htlmz to combine all of the epub htlm files into one large html file to make it easier to reformat the whole epub... But the way Calibre does it just adds a whole lot of work in removing all the unnecessary and redundant changes Calibre did to the existing tags...
You're very kind in using the term "flatten", I would have used "messy and redundant"
JulienDym is offline   Reply With Quote
Old 02-26-2016, 12:11 AM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
It is not kindness, it is the official calibre terminology.
And you should understand, that the Conversion feature is under no circumstances meant to be used as input for editing -- it was designed as a way to ensure consistency of design while papering over various device flaws, for the sake of end users who don't know what a file is.

Why on earth are you performing a conversion just to merge the internal HTML files?
For that matter, why on earth would performing inter-format conversions for the sake of merging the HTML files make it easier anyway??? Why is "one large HTML file" a desirable objective?

Since the real problem* you have is "I want to reformat the whole EPUB", I have a better solution for you.
Open the EPUB in the E-Book Editor (shortcut key is "T"), and reformat however you like. If you want to use regular expressions, you can do those on the whole set of files. If you really, really, really want to turn everything into one unwieldy file, though, you can do that too, using the "Merge Selected Files" right-click option in the Files Browser.



* -- it is common for people to ask questions based on their assumed solution, rather than ask questions based on their underlying problem. Which is backwards.

Last edited by eschwartz; 02-26-2016 at 12:14 AM.
eschwartz is offline   Reply With Quote
Old 02-26-2016, 10:32 AM   #5
JulienDym
Junior Member
JulienDym began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2011
Device: Kobo, Sony Touch Edition
Thank you so much!!!.... The "Merge Selected Files" right-click option in the Files Browser in the E-Book Editor worked real well for me.
JulienDym is offline   Reply With Quote
Advert
Old 02-26-2016, 10:52 AM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Happy to help... although I still think you can just do whatever changes you want to do inside the Editor and skip merging files.

The only reason I can think of for merging files is to perform bulk operations from some other editor (like Notepad++) -- but you can probably do whatever it is directly in the Editor. That's why the Editor exists, after all.
eschwartz is offline   Reply With Quote
Old 02-26-2016, 02:14 PM   #7
JulienDym
Junior Member
JulienDym began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2011
Device: Kobo, Sony Touch Edition
I like to work my html and css with Dreamweaver....
JulienDym is offline   Reply With Quote
Old 02-26-2016, 05:00 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,611
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
The only reason I can think of for merging files is to perform bulk operations from some other editor (like Notepad++) -- but you can probably do whatever it is directly in the Editor. That's why the Editor exists, after all.
- I do exactly this when I want to view the source code in Notepad++ while I'm editing the epub. Of course I could open the epub in a second instance of the editor or even a different editor - but that's danger-roos.

So I save, do the merge, export the resultant single html to the desktop, close without saving, and then open the epub again. Would be cool if there was a combined 'merge and export' feature (plugin ?) that didn't overwrite what's in the file under edit.

BR
BetterRed is offline   Reply With Quote
Old 02-26-2016, 05:03 PM   #9
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
@BR,

You could also use calibre's builtin checkpoints feature to rollback to before the merge. In fact, I am pretty sure merging will generate a checkpoint automatically.
eschwartz is offline   Reply With Quote
Old 02-26-2016, 07:45 PM   #10
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,611
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by eschwartz View Post
@BR,

You could also use calibre's builtin checkpoints feature to rollback to before the merge. In fact, I am pretty sure merging will generate a checkpoint automatically.
You're absolutely right, it does create a checkpoint before a merge - I never thought to check.

But to be honest I'm usually in Sigil when I want to do it, to my knowledge Sigil doesn't have a checkpoint feature. I regard that as a very (maybe the most) significant differentiator between the two editors.

Someone recently expressed the opinion that Sigil targets the professional bookmakers, whilst the calibre editor targets the DIY consumer; but I wonder how many of the latter actually use the checkpoint feature, and how many of the former would use it if they had it.

BR

Last edited by BetterRed; 02-26-2016 at 08:14 PM.
BetterRed is offline   Reply With Quote
Old 02-27-2016, 08:52 PM   #11
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
IIRC checkpoints are automatically created before ANY automatic action that touches two or more files.

And I have to agree with you that checkpoints are THE killer feature of calibre's Editor.

In most other things they are feature-comparable, so it is pretty much preference (and Sigil has a more established presence).
eschwartz is offline   Reply With Quote
Old 02-27-2016, 11:06 PM   #12
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: 43,914
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by eschwartz View Post
In most other things they are feature-comparable, so it is pretty much preference (and Sigil has a more established presence).
I really should put aside the time someday to write a comparison document, for pretty much every feature that exists in both, the calibre editor has a superior (either more powerful or more robust or both) implementation.

1) Spell check - calibre editor supports spell checking in multiple language documents and uses ICU for word iteration, which means it works with more "exotic" languages. It checks text not just between tags but also intelligently in attributes such as alt and title that contain user visible text.

2) Syntax highlighting -- the calibre editor highlights syntax errors, highlights document features, like headings, and is asynchronous, so has works much better on large documents, despite being written in an interpreted language.
- Works in CSS inside <style> tags
- Highlights links in the html and shows links that are broken. You can even Ctrl+Click on links to follow them from right in the editor code view. For example you see a link to a CSS stylesheet and want to edit it, just Ctrl+Click it in the code view.
- Autocomplete for links, closing tags and even anchors (the part after # in a link)
- Highlights matching HTML tags robustly
- Highlights invalid HTML live as you type
- Invisible characters are highlighted -- such as non-breaking spaces, special hyphens, etc.

3) Search and replace - The calibre editor has function mode, allowing you to perform very powerful transformations on your text. Sigil is missing this.

4) Live CSS - the calibre editor shows you the CSS that applies to the text you are currently editing -- it tracks your cursor, unlike the inspect element based Sigil equivalent (which the calibre editor also has).

5) The calibre editor has built in diffing which can be used both across ebooks and across checkpoints and after any complex/bulk operation. Perform a global search and replace and the calibre editor will show you exactly what changed nicely highlighted and allow you to revert all changes if you dont like them. Sigil has no diffing (at least that I could find). Nor does it have any concent of checkpoints at all, so if you perform potentially destructive/dangerous operations, you have to remember to manually save backups each and every time.

6) TOC Editor: The ToC editor allows you to choose toc locations by browsing the rendered view of your book rather than having to remember/hunt for ids. It allows you to auto-generate ToCs based on arbitrarily powerful XPath expressions.

7) The calibre editor uses an atomic write technique when saving your ebook file which means it can never corrupt your file even if you suffer a power failure in the middle of saving. And I'll just mention that Sigil for years had multiple bugs that could corrupt your document spontaneously. Those problems are mostly under control nowadays, but the calibre editor never had such problems thanks to what is, in my opinion, are much more robust internal design.

8) The calibre editor is internally designed to allow editing multiple (html based) document types, not just epub -- witness the support for editing azw3.

9) The calibre editor has a much more powerful implementation of snippets, with placeholders and convenient tabbing between them -- allowing for all sorts of advanced things -- http://manual.calibre-ebook.com/snippets.html

10) The editor has online help for html tags and css properties by simply right clicking on them.

11) The calibre editor's Check Book feature is builtin and can actually auto-fix many types of errors and also gives you detailed explanations of the meaning of errors. Not to mention that it actually checks for errors that cause real world problems instead of relying on sterile schema checks.

12) Builtin in font embedding/subsetting tools that actually understand font files in detail and parse GSUB and GPOS tables when subsetting.

13) A much more powerful plugin system which allows you to actually create plugins that extend the user interface not just work on an offline copy of the book passed to them by the main program.

14) Finally, the calibre editor does not make changes to your files just by opening them and it does not insist you follow a particular naming convention for organizing files and folders inside your epub.

Dont get me wrong, I'm glad that Sigil exists -- and I only created the calibre editor because at one point it looked like Sigil would cease to exist. Diversity and competition is good, I'm sure Sigil has good points that justify the preferences of those that prefer it over the calibre editor -- probably the biggest feature it has that the calibre editor does not is a WYSWYG mode.
kovidgoyal is online now   Reply With Quote
Old 02-28-2016, 03:47 AM   #13
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,611
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Actually, I find the syntax highlighting somewhat irritating.

When I select some text I don't really want the surrounding code tags highlighted too - they are colour coded, for me that's enough.

There's also a lag before before it does the highlighting, I find that distracting, I'm half way through typing something, suddenly the tags are highlighted, then I discover oops I've hit ctrl+x or something.

When I use control+right/left arrow repeatedly, to skip through words, the code highlighting gets totally out of synch with what I'm doing. If I don't step over a code boundary there should be no need to refresh the highlighting.

My suggested solution would be a preference to toggle it off.

Another irritant is that the context menu for selected text often covers the selected text - Sigil's not perfect in this, but definitely better - so is firefox I just noticed. In some situations Word's just as bad - but Esc then Menu key usually fixes it.

If I press menu key after pressing F8 for next spelling mistake I don't get a menu that includes suggested words, to get them I have to mouse right button click the highlighted word. In Sigil a tap on the menu key after F4 delivers a context menu that includes the suggested words.

I can't see the point of spell checking Comments in the content.opf - the definitive copy of Comments is in the database, if I correct them in the epub the changes don't flow through to the database - nor would I expect them too. A check box preference for "Spellcheck content.opf file" could fix this.

Whenever I consider switching back to the calibre editor, which is at least once a month, these are the sort of issues that deter me. For me at least, it's the little things make a big difference to usability.

I don't need most of the 14 features you've mentioned - I appreciate my 'don't needs' will be different to the next person's 'don't needs'. Some calibre features are handy to have, such as Live CSS and the Links and Words Reports - but I can use/get them when I need them.

And so it goes...

BR

Last edited by BetterRed; 02-28-2016 at 04:08 AM.
BetterRed is offline   Reply With Quote
Old 02-28-2016, 04:15 AM   #14
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
that most of those features aren't life-changing.

@BR -- I'm not sure what you mean regarding the context menu, when I use the context menu in Firefox it certainly doesn't go and avoid highlighted text. I truly have no idea what you mean there.

OPF comments -- the calibre Editor can integrate with a calibre library, but it doesn't have to. Presumably people use it on its own.
I don't find the feature troubling, and it can be useful...
eschwartz is offline   Reply With Quote
Old 02-28-2016, 04:44 AM   #15
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: 43,914
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Once again

Quote:
I'm sure Sigil has good points that justify the preferences of those that prefer it over the calibre editor
I'm not trying to convince you, or indeed anyone, to use the calibre editor over Sigil. I'm just pointing out that the calibre editor and Sigil are not equivalent. So I am listing some of the differences between them, whether you find those differences compelling or not, is entirely your business.
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting to HTMLZ format... hikerguy Conversion 2 03-29-2015 05:38 PM
Converting HTMLZ to pdf clark_x_zhang Conversion 1 07-29-2013 07:44 PM
Problem converting from HTMLZ to PDF bblouie Conversion 2 01-07-2013 09:12 AM
Converting to HTMLZ, two copies of cover? shandrakor Conversion 5 04-12-2012 01:32 PM
htmlz to epub? shootist Other formats 1 03-19-2012 10:28 PM


All times are GMT -4. The time now is 08:54 PM.


MobileRead.com is a privately owned, operated and funded community.