02-17-2011, 02:17 AM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2011
Device: kindle
|
Importing .mobi cover image from HTML
When using mobigen, I could include a <meta name="cover" content="cover.jpg" /> tag in the <head> of a HTML source document to import the cover into a .mobi book.
ebook-convert does not seem to support this and I was wondering if there was an alternative method. The only way that I see to do it currently is either to search the file and use the --cover argument or to generate a .opf container for the book. As best I can tell, generating the .opf requires me to also extract other metadata and build the <guide> and <spine>, and I'd like to avoid the extra work. Is there a way to specify the cover in the HTML file? |
02-17-2011, 12:14 PM | #2 |
creator of calibre
Posts: 44,183
Karma: 23000000
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can specify almost all metadata in html files, except cover. FOr that you have to use --cover
See https://www.mobileread.com/forums/sho...44&postcount=9 |
Advert | |
|
02-17-2011, 05:05 PM | #3 |
Junior Member
Posts: 3
Karma: 10
Join Date: Feb 2011
Device: kindle
|
Program for "open with" to convert to .mobi
The program I'm working on is a batch file to use in the "open with" menu in windows explorer. The program is at:
https://github.com/wholcomb/tip/raw/...nvert2mobi.bat To get around the issue with the cover, I wrote a small javascript to extract it from the header if it is there: https://github.com/wholcomb/tip/raw/.../find_cover.js The regular expression somewhat brittle at the moment in the tags it will recognize. I'll make it more flexible later. |
Tags |
cover, html, meta, mobi, tag |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Auto-creation of cover image on .epub to .mobi conversion | december | Calibre | 4 | 02-10-2012 05:31 PM |
HTML file to MOBI Cover Problem | ddaedalus | Conversion | 6 | 02-06-2011 05:16 PM |
Cover image aspect ratio for mobi | Evildad | Conversion | 4 | 01-27-2011 10:29 PM |
Setting first HTML file Image as Cover? | phnord | Calibre | 2 | 01-09-2010 03:13 AM |
Importing HTML Files | Shadowlane | Calibre | 1 | 12-19-2009 03:04 PM |