Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-02-2014, 07:28 AM   #1
Kode
Junior Member
Kode began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2014
Device: Kobo Glo
Saving metadata and covers with the cli interface not working properly

I'm having some issues using ebook-meta but it only seems to happen to some formats.

epub files seem to work fine.

lit files don't work at all.
Code:
C:\>ebook-meta zoe.lit --title "test"
Original metadata::
        Title               : Zoe's Tale
        Author(s)           : John Scalzi [John Scalzi]

Changed metadata::
        Title               : Zoe's Tale
        Author(s)           : John Scalzi [John Scalzi]
lrf file meta data can be updated but --cover does nothing

mobi files metadata updates fine, but --cover doesn't seem to work all the time, no errors are produced though

--get-cover works for all of them though.

When I looked in /src/calibre/ebooks/metadata/epub.py there are references to creating covers, mobi.py also has some, but lit.py doesn't have anything.

Any ideas?

*EDIT*

Interestingly using ebook-convert using the same format for input and output *does* work, so if there is no way round it I can use that, it just takes a LOT longer

Last edited by Kode; 11-02-2014 at 07:43 AM.
Kode is offline   Reply With Quote
Old 11-08-2014, 09:19 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: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
ebook-meta can only do whatever calibre GUI can do in send-to-device/save-to-disk, and the only formats that support cover metadata are EPUB and AZW3. For example, MOBI can have a cover image file at the head of the ebook, but as far as calibre knows it is just the first page and there is nothing identifying it as a cover. (That is why you end up with 2 covers when you convert.)

A conversion will always prepend a cover, and for the two supported formats will add/update proper cover metadata, but for other formats will merely prepend the only thing that format understands -- a part-of-the-book image.
Which is why ebook-convert was able to add a "cover" (at least, we the reader know it is a cover instead of any random image).

Some reader programs, like the Kindle, will assume an image that is the first thing is the cover.

Basically, metadata support was a mess until EPUB (and it isn't wonderful even now).


I do not know why the lit didn't have the title updated. Does lit support metadata? I don't know, I never used it.
eschwartz is offline   Reply With Quote
Advert
Old 11-09-2014, 08:04 AM   #3
Kode
Junior Member
Kode began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2014
Device: Kobo Glo
Thanks for replying eschwartz, that's interesting about the covers, I didn't realise that.

Quote:
Originally Posted by eschwartz View Post
I do not know why the lit didn't have the title updated. Does lit support metadata? I don't know, I never used it.
I'm not 100% sure, but I assume it does as it does get updated as part of a conversion, in fact I just tested and as part of a convert at least the title, tags, publisher and author get set and can then be read with ebook-meta

Code:
C:\>ebook-convert "zoe.lit" "test.lit" --cover "C:\test.jpg" --title "Zoe" --authors "Suzanne Collins" --publisher "Scholastic Press" --tags "Fiction"
1% Converting input to HTML...
InputFormatPlugin: LIT Input running
on C:\zoe.lit
--SNIP--
LIT output written to C:\test.lit
Output saved to   C:\test.lit
Code:
C:\>ebook-meta "test.lit"
Title               : Zoe
Author(s)           : Suzanne Collins
Publisher           : Scholastic Press
Book Producer       : calibre (2.8.0) [http://calibre-ebook.com]
Tags                : Fiction
Code:
C:\>ebook-meta "test.lit" --title "new title" --authors "kode" --publisher "some
thing" --tags "blah"
Original metadata::
        Title               : Zoe
        Author(s)           : Suzanne Collins
        Publisher           : Scholastic Press
        Book Producer       : calibre (2.8.0) [http://calibre-ebook.com]
        Tags                : Fiction

Changed metadata::
        Title               : Zoe
        Author(s)           : Suzanne Collins
        Publisher           : Scholastic Press
        Book Producer       : calibre (2.8.0) [http://calibre-ebook.com]
        Tags                : Fiction

Last edited by Kode; 11-09-2014 at 08:10 AM.
Kode is offline   Reply With Quote
Old 11-09-2014, 08:08 AM   #4
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: 45,224
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
To get a list of formats for which calibre knows how to update metadata, go to Preferences->Plugins->metadata writer plugins
kovidgoyal is offline   Reply With Quote
Old 11-09-2014, 08:16 AM   #5
Kode
Junior Member
Kode began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2014
Device: Kobo Glo
Ahh, so according to that list it can read from lit but can't write to it?

Is there a list of which formats support updating the cover image?
Kode is offline   Reply With Quote
Advert
Old 11-09-2014, 09:05 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: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
And just to be clear, conversion ALWAYS "updates" metadata even though it, in fact, doesn't update. Regardless of format support for real updating.
eschwartz is offline   Reply With Quote
Old 11-09-2014, 11:26 AM   #7
Kode
Junior Member
Kode began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2014
Device: Kobo Glo
Quote:
Originally Posted by eschwartz View Post
just to be clear
I'm not sure that means what you think it means, I've read that sentence several times now and still don't know what you mean, lol
Kode is offline   Reply With Quote
Old 11-09-2014, 12:16 PM   #8
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 Kode View Post
I'm not sure that means what you think it means, I've read that sentence several times now and still don't know what you mean, lol
I'll try again.

calibre can recreate a book in two ways.
  1. An in-place update of the metadata fields.
  2. Converting the book back to the same format.

#1 has varying levels of support. Most formats, for instance, do not suppport covers.

#2 always works. It takes the book contents, and sticks it in a brand-new book created with ALL the right metadata. This also does other, invasive changes, like CSS flattening (for formats that support CSS ).
eschwartz is offline   Reply With Quote
Old 11-09-2014, 06:27 PM   #9
Kode
Junior Member
Kode began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Nov 2014
Device: Kobo Glo
Thanks for taking the time to clarify that, I was struggling with the difference between "update", update and real updating but t makes sense now.

Convert doesn't really do an update, it creates a brand new book with the metadata you selected.
Kode is offline   Reply With Quote
Old 11-09-2014, 06:29 PM   #10
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)
Yep^^, there is:

"update" which is really recreating the book (sorry, just a little wry humor) and
real updating which is what it says on the tin.
eschwartz is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Metadata issue, CAPITALIZED names and covers are not displayed properly tkantor81 Library Management 5 09-21-2014 12:33 AM
Kobo Glo not properly saving position (2.3.1) OverHaze Kobo Reader 14 12-30-2012 10:08 AM
Linux - covers/metadata search not working Pulsecode Calibre 2 10-05-2011 03:27 PM
"Download Only Covers" not working properly myle00 Calibre 0 10-12-2009 05:54 PM


All times are GMT -4. The time now is 03:45 PM.


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