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 07-20-2015, 11:04 PM   #1
EbokJunkie
Addict
EbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blue
 
Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
Command line: How to embed color default cover instead of missing cover?

First, I'm running conversion from command line.
Second, I have a epub with missing cover.
Conversion epub->azw3 (and epub->epub) inserts default blank calibre_raster_cover.jpg of size 590X750.
However, Calibre GUI allows user to generate and embed various nice colored default covers stamped with author and title.
My question: Is there any way to generate and embed one of these stamped default covers using ebook-convert call from command line?

Last edited by EbokJunkie; 07-20-2015 at 11:17 PM.
EbokJunkie is offline   Reply With Quote
Old 07-21-2015, 12:06 AM   #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)
AFAIK you cannot access the cover generator via the CLI.

However, ebook-polish allows you to use "Polish book" via the CLI, and polishing is a lot less invasive than conversion. I suggest using that instead, and hopefully finding the good covers online.
eschwartz is offline   Reply With Quote
Advert
Old 07-21-2015, 12:20 AM   #3
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: 44,482
Karma: 24495778
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
conversion from the CLI use the same cover generator as the GUI, the only difference is you cannot control the random cover generation process from the CLI, though the CLI will use config settings for the cover generation process you have saved in the GUI.
kovidgoyal is offline   Reply With Quote
Old 07-21-2015, 02:06 AM   #4
EbokJunkie
Addict
EbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blue
 
Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
I opened GUI, unchecked all generation options except Silver and Banner, converted my no_cover.epub to no_cover.azw3, verified that azw3 in Calibre library really had targeted stamped cover, shut down GUI.
Using CLI converted my no_cover.epub to azw3: this azw3 has the same infamous blank calibre_raster_cover.jpg.

Kovid, what should I do to save config settings that defined generation of Silver Banner cover?
EbokJunkie is offline   Reply With Quote
Old 07-21-2015, 02:21 AM   #5
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,983
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by EbokJunkie View Post
I opened GUI, unchecked all generation options except Silver and Banner, converted my no_cover.epub to no_cover.azw3, verified that azw3 in Calibre library really had targeted stamped cover, shut down GUI.
Using CLI converted my no_cover.epub to azw3: this azw3 has the same infamous blank calibre_raster_cover.jpg.

Kovid, what should I do to save config settings that defined generation of Silver Banner cover?
@EbokJunkie - did you check the Save these settings for future use option - bottom left

You can verify by eyeballing cover_generation.json in calibre configuration folder ==>> In main GUI program (library manager) go to Preferences->Miscellaneous and click Open configuration directory button to open the folder.

BR
BetterRed is offline   Reply With Quote
Advert
Old 07-21-2015, 02:31 AM   #6
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: 44,482
Karma: 24495778
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@EbokJunkie: Not sure what you mean by the infamous blank calibre_raster_cover.jpg? azw3 files dont actually have internal filenames. So what are you referring to? If you open an azw3 in the editor, you will get generated filenames that look like 00001.jpg

And, as I recall, if you convert a document with no cover to azw3, the resulting azw3 will have no cover. You can try converting a simple .txt file to azw3 to check that.

IIRC only epub and pdf output formats auto-generate covers from the metadata, if no cover is present. So what you would need to do is convert no_cover.epub to auto_cover.epub and then convert auto_cover.epub to azw3
kovidgoyal is offline   Reply With Quote
Old 07-21-2015, 03:07 AM   #7
EbokJunkie
Addict
EbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blue
 
Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
Yes, I saw 000001.jpg inside but I recognized it easily by double click on it - same blank jpg with little ciricle with interrogation mark on its top.
I did what you suggested (epub->epub, epub->azw3) but still the same blank cover, easily visible with Calibre editor.
BTW, epub to epub conversion explicitly inserts calibre_raster_cover.jpg as a cover.
Converted to PDF with CLI, got the same result.
Might be some needed GUI settings are not saved automatically?

Last edited by EbokJunkie; 07-21-2015 at 03:13 AM.
EbokJunkie is offline   Reply With Quote
Old 07-21-2015, 05:54 AM   #8
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: 44,482
Karma: 24495778
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I cannot reproduce what you are saying. Converting an epub to epub with no cover using ebook-convert results in a default cover being generated and converting an epub with a cover to azw3 causes the azw3 to have that cover.

I think you are confusing something. Attach some sample files from what you are doing, I dont want to waste more time going around in circles.
kovidgoyal is offline   Reply With Quote
Old 07-21-2015, 04:08 PM   #9
EbokJunkie
Addict
EbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blue
 
Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
This is what I did:

1. In GUI, set options for generated cover Silver and Banner. Option "Save these settings as the defaults for future use" checked.
2. Downloaded from Project Gutenberg txt and epub files of book Under Orders by Kirk Munroe (1890).
Obtained Under_Orders.txt and Under_Orders.epub

txt
3. Converted Under_Orders.txt->Under_Orders(txt).epub. Obtained file with expected generated cover

azw3
4. Converted txt->azw3. Obtained Under_Orders(txt).azw3 without any cover
5. Converted Under_Orders(txt).azw3->Under_Orders(azw3)epub. Obtained file with expected generated cover

fb2
6. Converted txt->fb2. Obtained Under_Orders(txt).fb2 without any cover
7. Converted Under_Orders(txt).fb2->Under_Orders(fb2).epub. Obtained file with expected generated cover

epub (only cover file deleted)
8. Using Calibre editor, deleted cover in file Under_Orders.epub and saved it as file Under_Orders_deleted_cover.epub
9. Converted Under_Orders_deleted_cover.epub->Under_Orders_deleted_cover_blank_cover.epub. Obtained file with blank calibre_raster_cover.jpg

epub (all refs to cover erased)
8. Using Calibre editor, deleted cover in file Under_Orders.epub, searched and erased all cover refrences and saved it as file Under_Orders_deleted_cover_all_cover_refs_erased.e pub
9. Converted Under_Orders_deleted_cover_all_cover_refs_erased.e pub->Under_Orders_deleted_cover_all_cover_refs_erased_ auto_cover.epub. Obtained file with expected generated cover.


Bottom line:
10. Three conversions, namely txt->epub, fb2->epub, and azw3->epub succeeded to obtain expected generated cover in cover absence in input files.
11. Conversion epub->epub provides expected generated cover in output epub only if cover references in input epub are missing as well cover itself.
12. Conversion epub->epub embeds blank calibre_raster_cover.jpg in output file if cover itself is missing from input but cover is still referenced.

My problem was with item 12: if input epub somehow on the road lost cover (this may happen) and references are still in place than this blank cover gets into the output epub and from there to azw3 (I'm running two conversions epub->epub and epub->azw3 in batch file). My hope was to obtain nice Calibre generated cover even in this situation.

All files mentioned above are attached.
Attached Files
File Type: zip No cover testing.zip (2.34 MB, 291 views)
EbokJunkie is offline   Reply With Quote
Old 07-22-2015, 12:30 AM   #10
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: 44,482
Karma: 24495778
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Well yeah, if your input document is corrupted -- as in your case -- it has references to images that are not actually present or are corrupted and dont render, conversion is not going to fix that automatically for you.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot embed cover to ebook file Siavahda Calibre 4 06-24-2015 12:10 PM
Change Default Format Opened When clicking a cover in cover browser? phaeren12 Library Management 11 09-19-2014 10:10 PM
HTML to MOBI command line convert not generating default cover? DarkAbsynthe Conversion 3 10-19-2013 11:53 PM
Disable Cover for Command Line ebook-convert bcolflesh Calibre 9 02-21-2013 11:02 AM
Command line convert ePub->MOBI mangles cover cscotts Calibre 7 12-14-2010 12:21 AM


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


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