10-16-2017, 01:39 PM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2014
Device: kindle
|
Running the cover generator standalone on linux
I'd like to make book-cover images using calibre's cover generator. I *don't* want to do it from the GUI, however. Is there some way I can run the cover generator as a separate program in linux, feeding it author/title/series metadata as command-line arguments, along with the name of the image file for it to produce?
The cover generator's current status as a plugin works fine for doing in-calibre conversions from the GUI. But won't work if one is simply trying to produce a book using other production techniques, outside of calibre, with a GUI-free workflow. I'm not committed to the calibre cover generator, for that matter. It makes fine covers, but if there's a non-calibre way to make cover jpegs, I'd also be interested in that. Thanks! Olin |
10-16-2017, 01:41 PM | #2 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Simply convert to EPUB without any cover in the input document and ebook-convert will generate a cover automatically.
|
10-16-2017, 02:27 PM | #3 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2014
Device: kindle
|
Quote:
What you suggest will produce an *epub* file. Which will unzip into a directory containing a file images/calibre_cover.jpg. I'm just looking for a program that will produce that calibre_cover.jpg file directly, and nothing else. Clearly that is happening at some point in the execution of ebook-convert. Is there some way to do this? (As a workaround, I *could* use ebook-convert to do an epub->epub conversion on a trivial book, then extract images/calibre_cover.jpg from the result. But that seems like a bit of a hack.) (I see mention of SVG format covers in the manual, but what ebook-convert makes for me is a jpg.) Secondarily, it would be nice if there was some way to choose among the various styles (banner, cross, blocks, etc.) of cover image that ebook-convert knows how to produce, and select the color. Olin P.S. While I'm writing: are there any plans to have calibre support the current epub standard, 3.1? E.g., a way to have ebook-convert produce books in this format? |
|
10-16-2017, 11:05 PM | #4 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I dont see what's so hacky about it. But if you really want to run just the cover generator, do it like this.
Code:
calibre-debug -c "from calibre.ebooks.covers import *; open('cover.jpg', 'wb').write(create_cover('my title', ['my author'])))" And you can set whatever preferences you like when using the create_cover function, see the sourcecode for details. As for EPUB 3 sure someday, but since the EPUB standards are a bad joke and there is nothing you can do in EPUB 3 that you cant do in EPUB 2 I'm not particularly motivated to do so. |
10-18-2017, 11:34 AM | #5 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2014
Device: kindle
|
Quote:
|
|
10-31-2017, 09:59 AM | #6 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2014
Device: kindle
|
Quote:
One more question: can you tell me how to make this code cause SVG output? -Olin |
|
10-31-2017, 10:02 AM | #7 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
covers are generated as raster images, there is no svg output
|
10-31-2017, 10:26 AM | #8 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2014
Device: kindle
|
|
10-31-2017, 10:50 AM | #9 |
creator of calibre
Posts: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That refers to the wrappedr code used to display the image inside the epub
|
10-31-2017, 11:02 AM | #10 |
Junior Member
Posts: 6
Karma: 10
Join Date: Oct 2014
Device: kindle
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem on Cover Generator | qprfan99 | Calibre | 2 | 10-09-2017 07:42 AM |
Building the Linux standalone Sigil installer | eschwartz | Sigil | 10 | 12-20-2015 04:13 PM |
New (built-in) Cover Generator | weberr | Calibre | 8 | 11-08-2014 10:55 PM |
Build Sigil as standalone binary (on Linux) | mustai | Sigil | 1 | 05-12-2014 02:20 AM |
Standalone Server(linux) version just for collecting news? | bigreat | Calibre | 8 | 02-25-2010 01:03 PM |