View Single Post
Old 08-03-2014, 01:45 AM   #17
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: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by shotsky View Post
The answer for me is that Calibre does not respect class names when it converts. Some class names depict what follows, and Calibre simply blindly renames them calibrexx and you lose the original meaning. That is a no starter for me, and I continue to look for a way to decompile ebooks that does not involve Calibre with its sticky fingers renaming everything.
No explanation about why this is done, just that 'I am not interested in changing it.' That is really too bad, because a number of people use Calibre to get to the source html to work on that, but with classes all renamed, it is difficult if not impossible to know what you are editing.
One example is that I work with cookbooks in mobi/epub format. Before conversion, the html class may say <div class="titlel">. Afterwards, it says <div class="calibre59">.
A cookbook with 100 'pages' has 100 recipes. All the title tags are lost, although the text of the titles is there. The point is that there is no longer a reliable tag remaining with which to automate identification of the titles.
I have found that if you use the debug function, you can get the html as it was inside the ebook before conversion takes place. However, each page is a separate html file, so editing those is nearly impossible, too, unless you can find a way to merge the html files into a single file in the correct order. Not easy, but doable with sufficient effort.
calibre is primarily geared towards the casual user who needs books on their device. Flattening the CSS makes it a lot easier to provide a consistent, effective experience for those people.

That is why we have plugins, like the one JSWolf suggested -- for people who need greater control to get at the innards of the books.

Also why we have an editor that can directly edit the source of AZW3 files.
eschwartz is offline   Reply With Quote