|01-08-2010, 08:34 PM||#1|
Join Date: Jan 2010
Setting first HTML file Image as Cover?
I have a large amount of HTML files (500 or so) that I want to convert to ePub's for my iPhone stanza app - and Calibre has been doing great with it.
However, there's one thing I'd like to be able to do. Each HTML file has a single image in it. This image precedes the content of the rest of the page.
I would like to be able to automatically set each ePub's cover to be this image.
I can't seem to find a way to do this in Calibre. The closest has been to the following:
- Import them into Calibre normally
- Convert the books to ePub w/ the No Cover Page option
- Individually edit the meta-data of each to grab the first image from the ePub format
There are two problems with this method:
- It is not feasible to edit the metadata individually of all five-hundred books
- The resulting cover image is just a snapshot of the top of the page - sometimes it cuts off the image, sometimes it grabs some of the rest of the page, etc.
Is there a way to do this in Calibre? If not, could someone point me in the right direction of a program that I can use to do this?
I also may be able to write a shell-script, php script, etc. to do this myself if someone could point me in the right direction...
|01-09-2010, 02:13 AM||#2|
creator of calibre
Join Date: Oct 2006
Location: Mumbai, India
Just write a shell script to set the covers programatically in calibre using the calibredb command. Once hte covers are set, a bulk convert will use those covers.
|01-09-2010, 03:13 AM||#3|
Join Date: Jan 2010
Could you give me an example of the syntax for the calibredb commands I'd need to use - both to get the name of the .jpg bundled in the .zip archive and to set the cover to a .jpg of that name?
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Merging multiple HTML files into one HTML file||skoobwoman||Workshop||44||01-01-2012 01:43 PM|
|Setting Image width on news feed||Wiggles||Calibre||2||08-13-2010 02:10 AM|
|Extracting a cover image from lit file||p3aul||Calibre||6||07-25-2010 04:33 PM|
|Calibre viewer setting file time||banjomike||Calibre||6||06-14-2010 05:18 PM|
|How can i convert HTML or txt file to EPUB file ?||guguqiaqia||ePub||7||05-28-2010 09:15 PM|