View Single Post
Old 09-25-2014, 10:31 PM   #30
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
One of the few item JSWolf and I seem to agree on is that many publishers only support for "epub3" ebooks is changing the version from 2.0 to 3.0.
It's slightly more then just changing the version number. It's adding in a NAV ToC and some meta tags in the OPF that can easily be deleted as they don't add anything to the ePub. But to convert back to ePub 2 is trivial.

This is the original ePub 3 OPF from Unlocked by John Scalzi (published by Tor)

Code:
<package xmlns="http://www.idpf.org/2007/opf" prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/" unique-identifier="pub-id" version="3.0">
	<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
		<dc:title id="t1" xml:lang="en">Unlocked</dc:title>
		<meta property="title-type" refines="#t1">main</meta>
		<meta property="display-seq" refines="#t1">1</meta>
		<dc:identifier id="pub-id">9781466871793</dc:identifier>
		<meta id="isbn" property="dcterms:identifer">urn:isbn:9781466871793</meta>
		<dc:creator id="auth1">John Scalzi</dc:creator>
		<meta property="role" refines="#auth1" scheme="marc:relators">aut</meta>
		<meta property="display-seq" refines="#auth1">1</meta>
		<meta property="file-as" refines="#auth1">Scalzi, John</meta>
		<dc:language>en</dc:language>
		<meta property="dcterms:language">en</meta>
		<dc:publisher>Tom Doherty Associates</dc:publisher>
		<meta property="dcterms:publisher">Tor</meta>
		<dc:rights>Copyright © 2014 John Scalzi</dc:rights>
		<dc:date>2014-04-12</dc:date>
		<meta property="dcterms:modified">2014-04-12T16:00:00Z</meta>
		<meta property="ibooks:version">2.0.0</meta> 
		<meta content="my_cover_image" name="cover"/>
	<description xmlns="http://purl.org/dc/elements/1.1/">&lt;p&gt;A new near-future science fiction novella by John Scalzi, one of the most popular authors in modern SF. &lt;I&gt;Unlocked&lt;/I&gt; traces the medical history behind a virus that will sweep the globe and affect the majority of the world's population, setting the stage for &lt;I&gt;Lock In&lt;/I&gt;, the next major novel by John Scalzi.&lt;br&gt;&lt;P&gt;At the publisher's request, this title is being sold without Digital Rights Management software (DRM) applied.&lt;/P&gt;</description>
</metadata>
	<manifest>
		<item href="nav.xhtml" id="nav" media-type="application/xhtml+xml" properties="nav"/>
		<item href="9781466871793_epub_ncx_r1.ncx" id="ncx" media-type="application/x-dtbncx+xml"/>
		<item href="OEBPS/cvi.xhtml" id="cvi" media-type="application/xhtml+xml"/>
		<item href="OEBPS/tp.xhtml" id="tp" media-type="application/xhtml+xml"/>
		<item href="OEBPS/ded.xhtml" id="ded" media-type="application/xhtml+xml"/>
		<item href="OEBPS/cop_not.xhtml" id="cop_not" media-type="application/xhtml+xml"/>
		<item href="OEBPS/toc.xhtml" id="toc" media-type="application/xhtml+xml"/>
		<item href="OEBPS/int.xhtml" id="int" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p01.xhtml" id="p01" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p02.xhtml" id="p02" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p03.xhtml" id="p03" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p04.xhtml" id="p04" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p05.xhtml" id="p05" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p06.xhtml" id="p06" media-type="application/xhtml+xml"/>
		<item href="OEBPS/teas.xhtml" id="teas" media-type="application/xhtml+xml"/>
		<item href="OEBPS/exc.xhtml" id="exc" media-type="application/xhtml+xml"/>
		<item href="OEBPS/oth.xhtml" id="oth" media-type="application/xhtml+xml"/>
		<item href="OEBPS/tor-ad.xhtml" id="tor-ad" media-type="application/xhtml+xml"/>
		<item href="OEBPS/cop.xhtml" id="cop" media-type="application/xhtml+xml"/>
		<item href="OEBPS/style.css" id="css" media-type="text/css"/>
		<item href="OEBPS/images/96-1.jpg" id="img96-1.jpg" media-type="image/jpeg"/>
		<item href="OEBPS/images/com.jpg" id="imgcom.jpg" media-type="image/jpeg"/>
		<item href="OEBPS/images/title_page.jpg" id="imgfpage" media-type="image/jpeg"/>
		<item href="OEBPS/images/Tordotcom_ad.jpg" id="imgfad" media-type="image/jpeg"/>
		<item href="OEBPS/images/cover.jpg" id="my_cover_image" media-type="image/jpeg"/>
<item href="OEBPS/fonts/CharisSILB.ttf" id="font1" media-type="application/x-font-ttf"/>
<item href="OEBPS/fonts/CharisSILBI.ttf" id="font2" media-type="application/x-font-ttf"/>
<item href="OEBPS/fonts/CharisSILI.ttf" id="font3" media-type="application/x-font-ttf"/>
<item href="OEBPS/fonts/CharisSILR.ttf" id="font4" media-type="application/x-font-ttf"/>
	</manifest>
	<spine toc="ncx">
		<itemref idref="cvi" linear="yes"/>
		<itemref idref="tp"/>
		<itemref idref="ded"/>
		<itemref idref="cop_not"/>
		<itemref idref="toc"/>
		<itemref idref="int"/>
		<itemref idref="p01"/>
		<itemref idref="p02"/>
		<itemref idref="p03"/>
		<itemref idref="p04"/>
		<itemref idref="p05"/>
		<itemref idref="p06"/>
		<itemref idref="teas"/>
		<itemref idref="exc"/>
		<itemref idref="oth"/>
		<itemref idref="tor-ad"/>
		<itemref idref="cop"/>
	</spine>
</package>
Here is the same OPF converted to ePub 2.

Code:
<?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="2.0">
  <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
    <dc:identifier id="BookId" opf:scheme="UUID">urn:uuid:d639d480-af40-45e3-a267-69fac5b090ef</dc:identifier>
    <dc:title>Lock 0.5 - Unlocked</dc:title>
    <dc:creator>John Scalzi</dc:creator>
    <dc:language>en</dc:language>
    <dc:publisher>Tom Doherty Associates</dc:publisher>
    <dc:rights>Copyright © 2014 John Scalzi</dc:rights>
    <dc:date>2014-04-12</dc:date>
    <meta name="cover" content="my_cover_image"/>
    <dc:description>&lt;p&gt;A new near-future science fiction novella by John Scalzi, one of the most popular authors in modern SF. &lt;I&gt;Unlocked&lt;/I&gt; traces the medical history behind a virus that will sweep the globe and affect the majority of the world's population, setting the stage for &lt;I&gt;Lock In&lt;/I&gt;, the next major novel by John Scalzi.&lt;br&gt;&lt;P&gt;At the publisher's request, this title is being sold without Digital Rights Management software (DRM) applied.&lt;/P&gt;</dc:description>
    <meta xmlns="http://www.idpf.org/2007/opf" content="0.7.4" name="Sigil version"/>
    <dc:date opf:event="modification">2014-08-26</dc:date>
  </metadata>
	<manifest>
		<item href="9781466871793_epub_ncx_r1.ncx" id="ncx" media-type="application/x-dtbncx+xml"/>
		<item href="OEBPS/cvi.xhtml" id="cvi" media-type="application/xhtml+xml"/>
		<item href="OEBPS/tp.xhtml" id="tp" media-type="application/xhtml+xml"/>
		<item href="OEBPS/ded.xhtml" id="ded" media-type="application/xhtml+xml"/>
		<item href="OEBPS/int.xhtml" id="int" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p01.xhtml" id="p01" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p02.xhtml" id="p02" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p03.xhtml" id="p03" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p04.xhtml" id="p04" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p05.xhtml" id="p05" media-type="application/xhtml+xml"/>
		<item href="OEBPS/p06.xhtml" id="p06" media-type="application/xhtml+xml"/>
		<item href="OEBPS/oth.xhtml" id="oth" media-type="application/xhtml+xml"/>
		<item href="OEBPS/cop.xhtml" id="cop" media-type="application/xhtml+xml"/>
		<item href="OEBPS/style.css" id="css" media-type="text/css"/>
		<item href="OEBPS/images/96-1.jpg" id="img96-1.jpg" media-type="image/jpeg"/>
		<item href="OEBPS/images/title_page.jpg" id="imgfpage" media-type="image/jpeg"/>
		<item href="OEBPS/images/cover.jpg" id="my_cover_image" media-type="image/jpeg"/>
<item href="OEBPS/fonts/CharisSILB.ttf" id="font1" media-type="application/x-font-ttf"/>
<item href="OEBPS/fonts/CharisSILI.ttf" id="font3" media-type="application/x-font-ttf"/>
<item href="OEBPS/fonts/CharisSILR.ttf" id="font4" media-type="application/x-font-ttf"/>
	</manifest>
	<spine toc="ncx">
		<itemref idref="cvi" linear="yes"/>
		<itemref idref="tp"/>
		<itemref idref="ded"/>
		<itemref idref="int"/>
		<itemref idref="p01"/>
		<itemref idref="p02"/>
		<itemref idref="p03"/>
		<itemref idref="p04"/>
		<itemref idref="p05"/>
		<itemref idref="p06"/>
		<itemref idref="oth"/>
		<itemref idref="cop"/>
	</spine>
</package>
Most of the changes take place in the metadata section of the OPF. I did have to remove the NAV ToC and I removed the XML ToC (because this is ePub and we don't need it). Also had to delete those two files. But really, it's so very simple to go from ePub 3 to ePub 2 when the changes are just to be able to say it's an ePub 3.

Also, take a look at some of the meta property tags in the original OPF, they are just duplicating what we already have for meta tags. So why do we need these extranious duplicated property tags? We don't. There is not a single meta property tag that has any actual use. Take them all out and the ePub is not going to break. In fact, it's going to make the OPF smaller and easier to read.

Last edited by JSWolf; 09-25-2014 at 10:51 PM.
JSWolf is offline   Reply With Quote