Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-19-2014, 01:23 AM   #1
marst
Connoisseur
marst began at the beginning.
 
marst's Avatar
 
Posts: 72
Karma: 10
Join Date: Mar 2011
Location: Left coast, USA
Device: Kobo Forma; Android tablet w/Mantano Reader
Adding a cover: save vs. convert

I wanted to update an EPUB file by adding a cover (a file on the local machine) and by updating the EPUB's description. I made those changes in calibre's metadata editor. The book then appeared in calibre's library with the new cover. I saved the EPUB to disk.

But I found that while I now had an updated description, the newly saved file did not have a cover. Yet the was book displayed in the calibre library with the new cover.

Then I thought I should try conversion (not just 'save to disk'). That did insert the cover page -- and now I had a different book. The CSS files had been altered with many new selectors added, elements within the XHTML body text files had new styles assigned, a new style sheet had been created and attached to all files, and in some cases styles now had line-height settings that differed from what they'd been before. I estimated that it might take 2 hours to fix all of those changes, even with batch search/replace (there'd be so many changes that I would probably need to write a script for that task). For now I will have to find some other way to add this cover.

Unless: Is there a way to tell calibre, when it does a conversion: leave all CSS intact -- no changes?
marst is offline   Reply With Quote
Old 04-19-2014, 03:05 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
The metadata editor just changes information in the Calibre database - it does not actually modify the ePub file.

If you want to insert a cover into the ebook file without any modifications then the easiest way is to use either the Calibre "Polish Books" function or the "modify ePub" plugin.

The fact that the "Save to Disk" function did not insert the new cover means that the original epub file had no identifiable cover to be replaced. Both the Polish Books and Modify ePub methods would correct this.

Another option is to use the Calibre edit book function as that gives you complete control over the contents of the epub file.

Conversion always makes changes so do not use that if you want the original css styles and names to remain intact. This is just the way that the Calibre conversion pipeline works and is not amenable to change.
itimpi is offline   Reply With Quote
Old 04-19-2014, 04:57 AM   #3
marst
Connoisseur
marst began at the beginning.
 
marst's Avatar
 
Posts: 72
Karma: 10
Join Date: Mar 2011
Location: Left coast, USA
Device: Kobo Forma; Android tablet w/Mantano Reader
Ok, then. Understood about conversion. Thanks for this information. I'll delve into "polish books." (I haven't been able to get the edit-book feature to work, but fortunately there's Sigil for that.)

And at the very least, even if the cover isn't saved without conversion, certain metadata changes are passed along following save-to-disk (without conversion): tags ("Subject" per Sigil's metadata editor), publisher, description (dc:description).
marst is offline   Reply With Quote
Old 04-19-2014, 09:38 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
Quote:
Originally Posted by marst View Post
And at the very least, even if the cover isn't saved without conversion, certain metadata changes are passed along following save-to-disk (without conversion): tags ("Subject" per Sigil's metadata editor), publisher, description (dc:description).
Just to be clear if there is a clearly identified cover in you ePub the Save to disk feature will update the cover with whatever is in calibre.
DoctorOhh is offline   Reply With Quote
Old 04-19-2014, 11:15 AM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Use the Quality Check Plugin to identify EPUB's with cover identity problems

Plugins ARE your friend
Take a few and review the index https://www.mobileread.com/forums/sho...d.php?t=118764 for ideas
theducks is offline   Reply With Quote
Reply

Tags
calibre, cover, css changes


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert and Save To Disk at same time? spedinfargo Library Management 4 01-19-2014 01:10 PM
Can't save after adding file phossler Editor 2 12-25-2013 12:24 PM
Adding a Cover versus Replacing a cover ParadiseLost Calibre 5 05-17-2013 07:42 PM
Suggestion: Convert and Save To....? Anarel Calibre 8 06-02-2010 07:36 PM
Optional characters in Save Template for Adding Books Starson17 Calibre 1 02-28-2010 12:52 PM


All times are GMT -4. The time now is 04:47 AM.


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