View Single Post
Old 08-24-2010, 03:32 AM   #11653
phenomshel
ZCD BombShel
phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.phenomshel ought to be getting tired of karma fortunes by now.
 
phenomshel's Avatar
 
Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
Quote:
Originally Posted by Sweetpea View Post
Yes

It's actually rather simple at that!

Here's an example of the metadata.opf I use to create my epub and mobi books:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="bookid">
    <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
        <dc:identifier id="bookid">[Book ID]</dc:identifier>
        <dc:title>[Book Title]</dc:title>
        <dc:creator opf:file-as="[Author]" opf:role="aut">[Author]</dc:creator>
        <dc:creator opf:file-as="[Author 2]" opf:role="aut">[Author]</dc:creator>
        <dc:language>en</dc:language>
        <dc:subject>[subject]</dc:subject>
        <meta name="cover" content="cover" />
    </metadata>
    <manifest>
        <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
        <item id="stylesheetMain" href="content/styles/main.css" media-type="text/css" />
        <item id="stylesheetTOC" href="content/styles/toc.css" media-type="text/css" />

        <item id="cover" href="content/images/cover.jpg" media-type="image/jpeg" />
        <item id="html-cover" href="content/cover.html" media-type="application/xhtml+xml" />

        <item id="titlepage" href="content/title.html" media-type="application/xhtml+xml" />
        <item id="toc" href="content/toc.html" media-type="application/xhtml+xml"/>
        <item id="text" href="content/text.html" media-type="application/xhtml+xml" />

        <item id="image_1" href="content/images/[image-name].jpg" media-type="image/jpeg" />
    </manifest>
    <spine toc="ncx">
        <itemref idref="html-cover" linear="no" />
        <itemref idref="titlepage" />
        <itemref idref="toc" />
        <itemref idref="text" />
    </spine>
    <guide>
        <reference type="cover" title="Cover Image" href="content/cover.html" />
        <reference type="title-page" title="Title page" href="content/title.html"/>
        <reference type="toc" title="Table of Contents" href="content/toc.html" />
    </guide>
</package>
Now, your XHTML files go to the "<manifest>" part. (<item id="titlepage" href="content/title.html" media-type="application/xhtml+xml" /> for example).

The HREF is the location of the file, relative to where you put the .OPF file. Id must be unique.

The <spine> is where you add them all together, in order. Actually the same as a real paper (or leather or any other material!) spine works. I'm not sure if epub uses the <guide>, but that's what you'll see in mobipocket books.

And XHTML is the same as HTML.
I do appreciate the help.
So in the <manifest> part I would need to list all 390 xhtml files?

Last edited by phenomshel; 08-24-2010 at 03:39 AM. Reason: still trying to understand
phenomshel is offline   Reply With Quote