Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 02-17-2011, 03:17 AM   #1
wholcomb
Junior Member
wholcomb began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2011
Device: kindle
Question 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?
wholcomb is offline   Reply With Quote
Old 02-17-2011, 01:14 PM   #2
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: 26,323
Karma: 5382313
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 http://www.mobileread.com/forums/sho...44&postcount=9
kovidgoyal is offline   Reply With Quote
Old 02-17-2011, 06:05 PM   #3
wholcomb
Junior Member
wholcomb began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2011
Device: kindle
Arrow 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.
wholcomb is offline   Reply With Quote
Reply

Tags
cover, html, meta, mobi, tag

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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 06:31 PM
HTML file to MOBI Cover Problem ddaedalus Conversion 6 02-06-2011 06:16 PM
Cover image aspect ratio for mobi Evildad Conversion 4 01-27-2011 11:29 PM
Setting first HTML file Image as Cover? phnord Calibre 2 01-09-2010 04:13 AM
Importing HTML Files Shadowlane Calibre 1 12-19-2009 04:04 PM


All times are GMT -4. The time now is 06:22 PM.


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