Quote:
Originally Posted by kovidgoyal
Are you kidding me? Apple decided to break the EPUB metadata standard?
|
You're surprised???
I was hoping they'd break the standard in a more interesting way. All of this info can be specified using the current OPF techniques. Presumably books bought from their store will have additional fields.
Looks like the cover image doesn't need to be extracted before adding the book to iTunes. The <dict> field contains a cover-image-path child, producing:
Code:
<dict>
<key>cover-image-hash</key>
<string>ALLTHESEHASHESAREQUITEINTERESTING</string>
<key>cover-image-path</key>
<string>cover.jpg</string>
</dict>
Which then shows as the cover in iTunes. It seems that iTunes looks for a metatdata element named "cover" and then uses the image with the corresponding id.
Thus, if your book has the following in its .opf file it will automatically find the cover:
Code:
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
...
<meta name="cover" content="cover-image" />
...
</metadata>
<manifest>
...
<item href="[path to cover image within epub structure]" id="cover-image" media-type="image/jpeg"/>
...
</manifest>