chainlp
èªçã«ãã使ãããchainlpã«ã¤ãã¦ãepubçã«ã©ããªã®ã調ã¹ã¦ã¿ã¾ããã
使ã£ããã®
chainlp http://no722.cocolog-nifty.com/blog/chainlp/
pagina epubchecker http://www.pagina-online.de/produkte/epub-checker/
EpubArchiver http://d.hatena.ne.jp/sauberwind+sakuraSoftware/20130907
Â
ä½æ¥
ãchainlpã¯ç»åã®ãªãµã¤ãºããæåãè¦ãããããããã«è²ãæ¿ããã¦ãããããä½ç½åé¤ãããããªæ©è½ããã£ãããã¾ãããã³ãã«ç¨ã«mobiã«å¤æãã¦ã¿ãã¨ãæ¡å¤§ã§ããªãã£ãã®ã§åå ã調ã¹ã¦ã¿ãã
ãEPUBåºåãããä¸ãè¦ã¦epubcheckããã¦ã¿ãããã§ãããããã£ã¨ãã£ã±ãã¨ã©ã¼ãåºã¦ãã¾ããã
ã¡ãªã¿ã«åºåãããã¡ã¤ã«åã¯chainlptest.epubã§ãã
ä¸ã¤ç®
chainlptest.epub: Mimetype entry missing or not the first in archive
ãmimetypeãepubã®åãã«éå§ç¸®ã§ç½®ãã¦ãªããã£ã¦ãããepubãã¯ããã«ç´æ¥ãããã ããã¨ãã«ããåºãè¦åãã§ã¦ããã¾ãã
ä¸ãã®ããã¦ã¿ãã¨ãä¸ã¤ç®ã®é層ã
ãã©ã«ãã¼ï¼contentãMETA-INF
ãã¡ã¤ã«ï¼iTunesArtworkãmetadata.opfãmimetypeãtoc.ncx
ã¨ãã風ã«ãªã£ã¦ããã¾ããããµã¤ãã¯ãã¯ããã®ãã¡ã¤ã«ã¯mimetypeã ãããªã
Â
ï¼ã¤ç®ã®ã¨ã©ã¼
chainlptest.epub/mimetype: Mimetype file should contain only the string "application/epub+zip".
 ãããã¯ããããã£ãmimetypeãéãã¨ãâapplication/epub+zipâã®å¾ã«æ¹è¡ãå ¥ã£ã¦ãããããæ¶ãã¨ã¨ã©ã¼ãæ¶ããã
WinRARã§ç´æ¥ç·¨éãã¦ãã®ããã£ãã解åãã¦ãããEpubArchiverã§epubã«åºãã¦*1
Â
ãå½ç¶ã¾ã ã¾ã ã¨ã©ã¼ã¯æ®ã£ã¦ã¾ããå§ç¸®ããªãããã¨ãã«ãã¡ã¤ã«åãtest.epubã«å¤ãã£ããã
test.epub/metadata.opf(13,50): character content of element "dc:identifier" invalid; must be a string with length at least 1Â
metadata.opfã«dc:identifierã¦ããåºæã®çªå·ããªãã£ã¦ãã¼ã該å½è¡ãè¦ã¦ããã¨ã
<dc:identifier opf:scheme="ISBN"></dc:identifier>ISBNãå ¥ã£ã¦ãªããªãå ¥åãå¿ããããããªãã®ã§é©å½ã«ï¼ï¼ã±ã¿ã®çªå·ãå ¥ãã¦ã¿ããããããæ¶ããã
ã次ã
ERROR: test.epub/metadata.opf(16,102): attribute "properties" not allowed here; expected attribute "fallback", "fallback-style", "required-modules" or "required-namespace"
Â
ERROR: test.epub/metadata.opf(167,41): attribute "page-progression-direction" not allowed here; expected attribute "id" or "toc"
Â
ERROR: test.epub/metadata.opf(167,41): element "spine" missing required attribute "toc"
Â
ERROR: test.epub/metadata.opf: unique-identifier attribute in package element must reference an existing identifier element id
ãããè¦ãã¨ããæå®è¡ãããªãã¦å®£è¨ã®ã»ãã«åé¡ãããããªã¨æã£ãã
ã®ã§ã宣è¨æãepub2ã«ãªã£ã¦ãã®ãepub3ã«ãã¦ã¿ãã
<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="calibre_id">
Â
<package xmlns="http://www.idpf.org/2007/opf" version="3.0" unique-identifier="calibre_id">
 ã¨ã©ã¼ãå¢ãããã©ãéãã¨ããã®ã¨ã©ã¼ãªã®ã§ä¿®æ£ãããæ°ãããã
Â
次ãã¾ãå¤ãªã®ãåºã¦ããã
ERROR: test.epub/metadata.opf(5,48): attribute "opf:role" not allowed here; expected attribute "dir", "id" or "xml:lang"
opf:roleã¯è¨±å¯ããã¦ãã¾ããã£ã¦åºã¦ãã®ã§æ¶ãã¦ã¿ãããopf:role="aut" ãæ¶ãã
Â
次ããªããä¼¼ããããªã¨ã©ã¼ããã£ã±ããªã®ã§ã次ã æ¶ãã¦ããã
ERROR: test.epub/metadata.opf(5,33): attribute "opf:file-as" not allowed here; expected attribute "dir", "id" or "xml:lang"
Â
ERROR: test.epub/metadata.opf(6,54): attribute "opf:role" not allowed here; expected attribute "dir", "id" or "xml:lang"
Â
ERROR: test.epub/metadata.opf(6,54): attribute "opf:file-as" not allowed here; expected attribute "dir", "id" or "xml:lang"
Â
ERROR: test.epub/metadata.opf(7,53): attribute "opf:scheme" not allowed here; expected attribute "id"
Â
ERROR: test.epub/metadata.opf(13,34): attribute "opf:scheme" not allowed here; expected attribute "id"
 opf:file-as="æ¥æ¥å¦å¾ä»¤"
opf:role="bkp"
 opf:file-as="ChainLP"
 opf:scheme="ChainLP"
 opf:scheme="ISBN"
ãæ¶ãã¦ã¿ãã
次ã
ERROR: test.epub/metadata.opf(2,92): assertion failed: package element unique-identifier attribute does not resolve to a dc:identifier element (given reference was 'calibre_id')
Â
ERROR: test.epub/metadata.opf(3,158): assertion failed: package dcterms:modified meta element must occur exactly once
Â
ERROR: test.epub/metadata.opf(15,11): assertion failed: Exactly one manifest item must declare the 'nav' property (number of 'nav' items: 0).
Â
ERROR: test.epub/metadata.opf(165,70): assertion failed: spine element toc attribute must be set when an NCX is included in the publication
 ãºã©ãã¨å®ç¾©éåã¦ããã®ãåºã¦ãã¾ããã
 unique-identifier="calibre_id"ãã¨ãªã£ã¦ãã¨ããã
unique-identifier="BookID"
ã«ãã¦ã¿ãããå¤åãªãã
<dc:identifier id="calibre_id"> ã
<dc:identifier id="BookID">ãã«ããã¦ã¿ãã
ã²ã¨ã¤æ¸ã£ãã
<dc:date>2013-11-21T21:29:58+09:00</dc:date> ã
<meta property="dcterms:modified">2013-11-23T21:46:41Z</meta>ãã«å¤ãã¦ã¿ãã
ã²ã¨ã¤æ¸ã£ããã¤ã¾ããæ¥ä»ã®å®ç¾©ã®ä»æ¹ãéã£ããããã
navã®ããããã£ã¼ãæå®ããã
<item id="id2ã®å¾ã« properties="nav"ãããã追å ã
ã²ã¨ã¤æ¸ã£ãã
Â
 <spine page-progression-direction="rtl"> ã
<spine page-progression-direction="rtl" toc="ncx">ãã«ããã
spineã«tocå±æ§ãä»ä¸ããã¨ãã£ãã®ã§ããããã
metadata.opfãã®ã¨ã©ã¼ããªããªããããã£ã¨ä¸¦ã¶ã¨ã©ã¼ãè¦ãã¨æ¬æãã¡ã¤ã«xhtmlã«åããããªæãã«åºç¾ãã¦ããã®ã§ãgrepã§ç½®ãæãç¨ã¨æããDevasã¨ããã½ããã使ã£ã¦ä¸æã«æ¸ãæãã
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
ãåé¤
ERROR: test.epub/content/index_P00001.xhtml(5,86): attribute "charset" not allowed here;
charsetã¨ããå±æ§ã¯è¨±å¯ããã¦ãã¾ããã¨ããã charset="UTF-8"ãåé¤ããã
ãã£ã±ããã£ãã®ãä¸æ°ã«ãªããªãã¾ããã
ERROR: test.epub/content/index_P00001.xhtml(7,7): assertion failed: Exactly one 'toc' nav element must be present
Â
ERROR: test.epub/content/resources/index_0.css(15,3): The 'direction' property must not be included in an EPUB Style Sheet.
Â
ERROR: test.epub/toc.ncx: External DTD entities are not allowed. Remove the DOCTYPE.
Â
ERROR: test.epub/toc.ncx(13,10): element "navMap" incomplete; missing required element "navPoint"
Â
ERROR: test.epub/toc.ncx: External DTD entities are not allowed. Remove the DOCTYPE.
Â
WARNING: test.epub: item (iTunesArtwork) exists in the zip file, but is not declared in the OPF file
 index_0.cssãã direction: rtl;ãåé¤
 <!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">ããåé¤
<navMap></navMap>ãä¸ã®ããã«æ¸ãæã
<navMap>
<navPoint id="toc1" playOrder="1">
<navLabel>
<text>1</text>
</navLabel>
<content src="content/index_P00001.xhtml"/>
</navPoint>
</navMap>
Â
 index_P00001.xhtmlãç¡çããããã²ã¼ã·ã§ã³æç« åããã®ã§ãå±æ§ã追å ã
<body>ã®å¾ã«
<nav xmlns:epub="http://www.idpf.org/2007/ops" epub:type="toc"></nav>ã追å
ããã§ãã£ã±ããã¡ããã¨ããã²ã¼ã·ã§ã³æç« ãæ¸ãã¨çªã£è¾¼ã¾ããã
element "nav" incomplete; missing required element "ol"
Â
ãåèã«ããã²ã¼ã·ã§ã³æç« ã®nav.xhtmlãå¥ã«ä½ã£ã¦å ¥ãããã¨ã«ããã
Â
 metadata.opfã®<manifest>ã«
  <item id="toc" properties="nav" href="content/nav.xhtml" media-type="application/xhtml+xml" />
 ã追å ã
  <item id="id2" href="content/index_P00001.xhtml" media-type="application/xhtml+xml" />
ããã properties="nav" ãåé¤
nav.xhtmlã®å 容ã
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="ja" xml:lang="ja">
<head>
<title>chainlptest</title>
</head>
Â
<body>
<nav epub:type="landmarks" id="landmarks" hidden="hidden">
<h2>Guide</h2>
<ol>
<li><a epub:type="bodymatter" href="index_P00001.xhtml">æ¬æ</a></li>
</ol>
</nav>
<nav epub:type="toc" id="nav" hidden="hidden">
<h1>ç®ã次</h1>
<ol>
<li><a href="index_P00001.xhtml">ä¸ãã¼ã¸</a></li>
</ol>
</nav>
</body>
</html>
æå¾ã«Â
WARNING: test.epub: item (iTunesArtwork) exists in the zip file, but is not declared in the OPF file
iTunesArtworkãæ®ã£ã¦ãã¾ããããã¡ã¤ã«ããããã©ããã£ã¦æ¸ãã¦ãªããã£ã¦å 容ãå¿ è¦ãªããããªã®ã§æ¶ãã
No errors or warnings detected
ã¨ã©ã¼ããªããªã£ãããã ããããã§æ£å¸¸ã«åãããã§ã¯ãªãã
 éä¸ã§ç²ãã¦ãããããã¾ã§ã«ãã¦ãããã
å¾ã§æã£ããã¨ãchainlpã§zipå§ç¸®ã§åºåãã¦ãããaozoraepub3ã§åºåããã»ããæ©ããããªæ°ããã¦ããã
ç»åãã¡ã¤ã«ãzipã§åºãããã¡ã¤ã«ãä¸ã®ãµã¤ãã®ããã«åºåããã»ããæ©ãããã«æãã
ã¿ã°ï¼epubchecker使ãæ¹ãã³ãã³ããæ¥æ¬èªããã¦ã³ãã¼ã windows ã¨ã©ã¼ validate validator ããªãã¼ããããªãã¼ã¿ã¼ãããªãã¼ã·ã§ã³ãvalidation readium pdf zip iphone mac googleplay books
*1:注ï¼ããä¸åº¦epubcheck ã§ä½åº¦ããã§ãã¯ãããã¨ã©ã¼ã¡ãã»ã¼ã¸ãã³ãã¼ããããããã«paginaEpub checkã使ã£ãã