Setting first HTML file Image as Cover?
Hey guys,
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...
Thanks!
|