Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-27-2015, 06:38 AM   #1
peter_parker
Member
peter_parker began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2015
Device: Android
Add cover to epub

Hi guys,

what I'm trying to do is quite simple, I only need to add a cover to a epub file.

The problem is, when I try to convert (from epub to epub) and add the cover, I lose the table of contents from the original file (and I want to keep it!).

How can I add the cover without changing anything else (specially the ToC!)?

Thanks!
peter_parker is offline   Reply With Quote
Old 01-27-2015, 07:03 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)
You could use the "Polish Books" feature which will do that without converting. You may have to add it to the toolbar - I have a feeling it is not there by default.
itimpi is offline   Reply With Quote
Advert
Old 01-27-2015, 07:51 AM   #3
drjenkins
Addict
drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.drjenkins ought to be getting tired of karma fortunes by now.
 
Posts: 250
Karma: 1702156
Join Date: Nov 2010
Device: Kindle Voyage
You could edit the epub and use the "Add cover" tool.
drjenkins is offline   Reply With Quote
Old 01-27-2015, 09:59 AM   #4
peter_parker
Member
peter_parker began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Jan 2015
Device: Android
Thanks guys!

I could fix my book and both tools will be very helpful in the future
peter_parker is offline   Reply With Quote
Old 01-30-2015, 12:37 PM   #5
Jack Knight
Junior Member
Jack Knight began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2015
Device: Ipad 4
Hello guys, if it's ok to do so, I would like to add my case to the thread, as apparently our problem is totally similar. I don't want to derail the thread so tell me if I'm wrong here.

I want to add a cover to a book which has a title page as cover.
Now I can drag and drop the new cover but it will replace the old one, and yeah, maybe I'm OCD but I don't want to lose the title page.

So how can I add a cover without deleting the old one ?
I tried fiddling with the edit book function for a moment but this is a little over my head :-/
Jack Knight is offline   Reply With Quote
Advert
Old 01-30-2015, 01:21 PM   #6
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,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jack Knight View Post
Hello guys, if it's ok to do so, I would like to add my case to the thread, as apparently our problem is totally similar. I don't want to derail the thread so tell me if I'm wrong here.

I want to add a cover to a book which has a title page as cover.
Now I can drag and drop the new cover but it will replace the old one, and yeah, maybe I'm OCD but I don't want to lose the title page.

So how can I add a cover without deleting the old one ?
I tried fiddling with the edit book function for a moment but this is a little over my head :-/
In Sigil this was easy:
all you need to unselect the semantics for both the Page and the image (if used), then those will remain when you use any calibre tool to add a cover since it will appear that there was none

In the ebook editor it appears you need to shift the semantics to another (new?) file and image

Using the 'File' menu Add the new cover Image to the book.

Now the trick to have a file to shift 'cover' status to
File: add: New:Click Import resource : pick an image (it can be any temporary.jpg or the real cover.jpg) OK
File: add: New: (temp.xhtml) OK
Now right click on the name: (temp.xhtml) in the file list:
Mark (temp.xhtml) as coverpage (it will want to make it the first item if it is not already)

These steps should now make your old titlepage stuff safe
(do a save?)

Now can add a cover inside the editor if you wish, If you used a real cover image.
Tools: Add cover: Select the image


Cleanup phase
Delete temp.xhtml (this will remove the fake 'cover' )
If you used a temporary image, remove that also
Save

You can use Polish or Modify EPUB to Insert a (now) Missing cover

As with most things in Calibre, there are a few ways to get from there to here
theducks is offline   Reply With Quote
Old 01-30-2015, 08:38 PM   #7
Jack Knight
Junior Member
Jack Knight began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2015
Device: Ipad 4
Thank you for your answer, theducks ! What I understood from it, because I'm a total noob in epub structure, led me to a possible solution.

So I...
- Opened the epub in Sigil.
- Removed the 'cover' status (semantic ?) of both the first html file and the image included in the epub.
- Renamed the image cover2 and changed the appropriate file name in the first html file. Was it necessary ?
- Used the 'add a cover' option.

I was having serious brain farts with the way calibre handles things and also had trouble with the fake blank cover reappearing upon an epub to epub conversion. While similar, Sigil creates an html file when adding a cover, which avoided dealing with temp file.

Would it be considered a good way of solving the matter ? Maybe more importantly, I hope I make a minimum of sense

Last edited by Jack Knight; 01-30-2015 at 08:40 PM.
Jack Knight is offline   Reply With Quote
Old 01-30-2015, 10:22 PM   #8
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,782
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Jack Knight View Post
Thank you for your answer, theducks ! What I understood from it, because I'm a total noob in epub structure, led me to a possible solution.

So I...
- Opened the epub in Sigil.
- Removed the 'cover' status (semantic ?) of both the first html file and the image included in the epub.
- Renamed the image cover2 and changed the appropriate file name in the first html file. Was it necessary ?
- Used the 'add a cover' option.

I was having serious brain farts with the way calibre handles things and also had trouble with the fake blank cover reappearing upon an epub to epub conversion. While similar, Sigil creates an html file when adding a cover, which avoided dealing with temp file.

Would it be considered a good way of solving the matter ? Maybe more importantly, I hope I make a minimum of sense

EPUB does not care what the names of the cover files are.
It is all about Location (first in the (Sigil text section) list) and semantics.

The 'cover' tool takes care of the semantics and makes a brand new file which is why the cover previous semantics must be cleared or those will be replaced (those old files become just another file in the book).


Why are you doing a EPUB -> EPUB after you did a cover change out? The whole purpose of this method was to avoid a same type conversion with associated side effects.
theducks is offline   Reply With Quote
Old 01-30-2015, 11:29 PM   #9
Jack Knight
Junior Member
Jack Knight began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2015
Device: Ipad 4
Hmm, force of habit or stupidity, you choose
As usually when you modify metadatas in calibre you have to epub > epub to apply the modification... I just kind of did that here as well. Which, yeah, thinking about it is not particularly clever, as the modification we did here was on the source file itself.
Jack Knight is offline   Reply With Quote
Old 01-30-2015, 11:57 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Jack Knight View Post
Hmm, force of habit or stupidity, you choose
As usually when you modify metadatas in calibre you have to epub > epub to apply the modification... I just kind of did that here as well. Which, yeah, thinking about it is not particularly clever, as the modification we did here was on the source file itself.
Nope. You do not have to ePub > ePub ever again.

use Polish books or Modify ePub and you can change the cover and the metadata without ever having to convert.
JSWolf is offline   Reply With Quote
Old 01-31-2015, 08:30 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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Or use Embed Metadata, which is a way of manually applying the same update routines on library books that normally is applied in Send-to-device or Save-to-disk.

It is not that calibre cannot update metadata. It simply chooses not to, unless you specifically request.

There is no point (usually) in changing the in-library copies of the ebooks*, and this way you can always revert if mysterious potentialities happen.

Any method of exporting books will update the metadata in the exported copies -- why else can we edit the fields in calibre's GUI?

* -- but sometimes you do want to. Like if you are hosting the books through calibre2opds or some other tool.

Last edited by eschwartz; 01-31-2015 at 08:33 PM.
eschwartz is offline   Reply With Quote
Reply

Tags
cover, table of contents


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ebook-meta command doesn't add cover to ePub and mobi EbokJunkie Conversion 8 04-28-2014 03:13 AM
Can Calibre not add a cover? capidamonte Calibre 8 06-13-2013 11:23 AM
How to best add a cover image? Alda Sigil 19 07-18-2012 10:51 AM
Gutenberg Original - Add a Cover SensualPoet Conversion 6 03-02-2012 09:23 AM
how to add cover in epub tonyvr4 Calibre 2 01-18-2012 07:47 AM


All times are GMT -4. The time now is 05:25 PM.


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