ããã¹ãã¨ãã£ã¿ã¨zipã³ãã³ãã ãã§é»åæ¸ç±ãä½ã£ã¦ã¿ã
æãã¨ããããã£ã¦ãePubå½¢å¼ã®é»åæ¸ç±ã«ã¤ãã¦èª¿ã¹ã¦ããã
ã©ããããePubã®å®ä½ã¯ zip å§ç¸®ãããXHTML+XMLãã¡ã¤ã«ã§æ§æããã¦ããããããããã¹ãã¨ãã£ã¿ããããã°ç°¡åã«ä½ããã£ã½ãã
以ä¸ã®ãã¼ã¸ãåèã«èªåã§ãä½ã£ã¦ã¿ãã
æ¥æ¬èªEpubããã¯ãµã³ãã« - 横æµå·¥æ社
.epub eBooks Tutorial
ePubãæ§æãããã¡ã¤ã«
ePubã¯ä»¥ä¸ã®ãããªãã¡ã¤ã«ç¾¤ã§æ§æããã*1
mimetype META-INF/ container.xml OEBPS/ content.opf toc.ncx ã³ã³ãã³ãï¼XHTMLï¼
以ä¸ããããã®ãã¡ã¤ã«ãããã¹ãã¨ãã£ã¿ã§è¨è¿°ãã¦ããã
ä½æ¥ãã©ã«ããç¨æãã
ã¾ãã以ä¸ã®ãããªä½æ¥ãã©ã«ããç¨æããã
hello/ META-INF OEBPS
mimetype ãä½æãã
helloãã©ã«ãã®ç´ä¸ã«ä»¥ä¸ã®ãããªå 容㧠mimetype ã¨ãããã¡ã¤ã«åã§ãã¡ã¤ã«ãä½æãã
application/epub+zip
ãã®ãã¡ã¤ã«ã¯ãé»åæ¸ç±ãªã¼ãã¼ããã¡ã¤ã«ã®å½¢å¼ãæ£ããèªèããããã«å¿ è¦ã§ãå¾ã®æé zipã§ãã¡ã¤ã«ãã¾ã¨ããã¨ãã«ããç¡å§ç¸®ãã§ãï¼çªæåã®ãã¡ã¤ã«ã¨ãã¦zipãã¡ã¤ã«ã«æ ¼ç´ããå¿ è¦ãããã
ä»æ§ã®è©³ç´°ã¯
OEBPS Container Format (OCF) 1.0 æ¥æ¬èªç
ãåç
§
META-INF/container.xml ãä½æãã
META-INFãã©ã«ãé
ä¸ã® container.xml ãã¡ã¤ã«ã¯ãePubã¨ããå
¥ãç©ã®ä¸ã«ã©ã®ãããªã¢ããå«ã¾ãã¦ããã®ãã¨ãã£ãæ
å ±ããããããã¡ã¤ã«ã
Amazonã§æ¸ç±ã注æããã¨ãã«å±ãããã段ãã¼ã«ç®±ãã¤ã¡ã¼ã¸ãããåãããããããã
container.xmlãèªãã°ããã®ç®±ã®ä¸ã«ã©ã®ãããªæ¸ç±ãå«ã¾ãã¦ãããåããããã«ãªã£ã¦ããã
ã¨ããããã以ä¸ã®ãããªXMLãã¡ã¤ã«ãä½æããã
<?xml version="1.0"?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml" /> </rootfiles> </container>
ä»æ§ã®è©³ç´°ã¯
OEBPS Container Format (OCF) 1.0 æ¥æ¬èªç
ãåç
§
OEBPS/content.opf ãä½æãã
OEBPSãã©ã«ãé
ä¸ã®content.opf ã¯ãæ¸ç±ã®ã¿ã¤ãã«ãèè
ãªã©ã®ã¡ã¿æ
å ±ãããã®ã³ã³ãã³ããæ§æãããã¡ã¤ã«ãå®ç¾©ãã¦ãããã¡ã¤ã«ã
ãã®ä¾ã§ã¯OEBPSãã©ã«ãã®é
ä¸ã«ä½ã£ã¦ãããã©ãå
ã®content.xmlãã¡ã¤ã«ã«é©åã«è¨è¿°ããã°ãä»»æã®ãã©ã«ãåã¨ãããã¨ãã§ããã
ããæ´å²çãªçµç·¯ã§ãOEBPSãã©ã«ããããªãã¨ã¡ããã¨èªã¿è¾¼ãã§ãããªãePubãªã¼ãã¼ãåå¨ãããããã®ã§ãOEBPSã£ã¦ååã«ãã¦ãããã»ããç¡é£ããã
content.opfã®å 容ã¯ä»¥ä¸ã®ã¨ãã
<?xml version="1.0"?> <package version="2.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId"> <metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf"> <!-- æ¸ç±ã®ã¿ã¤ãã« --> <dc:title>ããã«ã¡ã¯ .epub</dc:title> <!-- èè --> <dc:creator opf:role="aut">snaka72</dc:creator> <!-- è¨èª RFC3066ã«å¾ã --> <dc:language>ja</dc:language> <dc:rights>Public Domain</dc:rights> <dc:identifier id="BookId">urn:uuid:snaka72.20110403193850</dc:identifier> </metadata> <manifest> <item id="ncx" href="toc.ncx" media-type="text/xml" /> <item id="titlepage" href="title_page.xhtml" media-type="application/xhtml+xml" /> <item id="chapter01" href="chapter01.xhtml" media-type="application/xhtml+xml" /> <item id="chapter02" href="chapter02.xhtml" media-type="application/xhtml+xml" /> </manifest> <spine toc="ncx"> <itemref idref="titlepage" /> <itemref idref="chapter01" /> <itemref idref="chapter02" /> </spine> </package>
ä»æ§ã®è©³ç´°ã¯
OPF 2.0 v1.0 æ¥æ¬èªè¨³ [Open Packaging Format (OPF) 2.0 v1.0]
ãåç
§
OEBPS/toc.ncx ãä½æãã
OEBPS/toc.ncx ã¨ã¯ããç®æ¬¡ããå®ç¾©ãããã¡ã¤ã«ã
以ä¸ã®ãããªXMLãã¡ã¤ã«ã¨ãªã£ã¦ããã
<?xml version="1.0"?> <ncx xmlns="http://www.daisy.org/x3986/2005/ncx/" version="2005-1"> <head> <!-- content ã®å¤ã¯ content.opf ã®BookIdã®å¤ã¨ä¸è´ãããã㨠--> <meta name="dtb:uid" content="snaka72.20110403193850"/> <meta name="dtb:depth" content="1"/> <meta name="dtb:tatlPageCount" content="0"/> <meta name="dtb:maxPageNumber" content="0"/> </head> <!-- æ¸ç±ã¿ã¤ãã« --> <docTitle> <text>hello .epub</text> </docTitle> <navMap> <navPoint id="title_page" playOrder="1"> <navLabel> <text>ããã</text> </navLabel> <content src="title_page.xhtml"/> </navPoint> <navPoint id="chapter01" playOrder="2"> <navLabel> <text>第ï¼ç« </text> </navLabel> <content src="chapter01.xhtml"/> </navPoint> <navPoint id="chapter02" playOrder="3"> <navLabel> <text>第ï¼ç« </text> </navLabel> <content src="chapter02.xhtml"/> </navPoint> </navMap> </ncx>
ã¡ãªã¿ã«ãXMLãªã®ã§æ¥æ¬èªã使ãå ´åã¯ã¨ã³ã³ã¼ãã£ã³ã°ã¯UTF-8ãUTF-16ã«ãããã¨ã
ãã以å¤ï¼Shift_JISãEUC-JPï¼ã使ãå ´åã¯ãcharsetãé©åã«è¨å®ããå¿
è¦ãããã
NCXã®ä»æ§ã®è©³ç´°ã¯ã
Specifications for the Digital Talking Book
ãåç
§
ã³ã³ãã³ãï¼XHTMLï¼ãä½æ
ãããããæ¸ç±ã®ã³ã³ãã³ããä½ãã¾ãã
ã¨ãããã以ä¸ã®ãããªæ§æã§XHTMLãã¡ã¤ã«ãä½ãã¾ãã
- 表示ï¼å ¼ç®æ¬¡ï¼
- 第ï¼ç«
- 第ï¼ç«
ä¸èº«ã¯ãããªæã
title_page.xhtml
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <title>ããã«ã¡ã¯ .epub</title> </head> <body> <h1>ããã«ã¡ã¯ .epub</h1> <h2>ããã</h2> <ul> <li><a href="chapter01.xhtml">第ï¼ç« </a></li> <li><a href="chapter02.xhtml">第ï¼ç« </a></li> </ul> </body> </html>
chapter01.xhtml
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <title>Chapter01</title> </head> <body> <h2>第ï¼ç« ãããã«ã¡ã</h2> <p> ããã«ã¡ã ePub </p> </body> </html>
chapter02.xhtml
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> <head> <title>Chapter02</title> </head> <body> <h2>第ï¼ç« ããããã</h2> <p> ãããã ePub </p> </body> </html>
ã³ã³ãã³ãã®å¤§é¨åã¯é常ã®XHTML/CSSã¨åæ§ã«è¨è¿°ãããã¨ãå¯è½ã§ãããå¶éãæ¡å¼µããã¦ãé¨åãããããã§ãã
ä»æ§ã®è©³ç´°ã¯
OPS 2.0 v1.0 æ¥æ¬èªè¨³ [Open Publication Structure (OPS) 2.0 v1.0]
ãåç
§ã
.epub ãã¡ã¤ã«ãä½ã
ããã¾ã§ä½ã£ããã¡ã¤ã«ãã.epubãã¡ã¤ã«ã¨ãã¦ã¢ã¼ã«ã¤ãããã°ãé»åæ¸ç±ã®å®æã§ãã
.epubãã¡ã¤ã«ã¯ zip å½¢å¼ã§å§ç¸®ããå¿
è¦ãããã¾ãã
ã¾ããmimetypeãã¡ã¤ã«ã¯ããå§ç¸®ãªããã§ï¼çªç®ã®ãã¡ã¤ã«ã¨ãã¦ã¢ã¼ã«ã¤ããã¡ã¤ã«ã®ä¸ã«æ ¼ç´ããªããã°ãªãã¾ããã
zipã³ãã³ãã使ãããªãã以ä¸ã®ãããªæé ã§ã¢ã¼ã«ã¤ããä½æãããã¨ãã§ãã¾ãã
cd hello zip -0 ../hello.epub mimetype zip -r ../hello.epub * -x mimetype
ãã®æé ã¯ã
æ¥æ¬èªEpubããã¯ãµã³ãã« - 横æµå·¥æ社
ãã¨ã¦ãåèã«ãªãã¾ããã
iPhoneã§è¦ã¦ã¿ã
ã§ã¯ããã£ããä½æãããePubãã¡ã¤ã«ã iTunes ã«ãã©ãã°&ãããããã¦ãiPhone 転éãã¾ãã
åæãå®äºããããiPhone ã® iBook ãéãã¾ããããã¨ãä»ãããä½æããæ¸ç±ã®ã¿ã¤ãã«ãæ¬æ£ã«ä¸¦ãã§ããã®ãè¦ããã¨æãã¾ãã
ãããéãã¦ã¿ãã¨...
ç¡äºãiPhoneã§èªåã®ä½ã£ãæ¸ç±ãèªããã¨ãã§ãã¾ããã
åèãªã³ã¯
ePubã¨é»åæ¸ç±ã®é¢ä¿ã¨ã
10åã§èªããePubã®åºç¤ã¼ãã®1ï¼ePubã¨ã¯ï¼ï¼OPSãOPFãOCFã®3ä»æ§
é»åæ¸ç±ã®æ¨æºè¦æ ¼ãEPUBãæ©ããã | 3streamer blog
ePubãæ§æãããã¡ã¤ã«ã®ä»æ§ã«ã¤ãã¦
æ¥æ¬èªEpubããã¯ãµã³ãã« - 横æµå·¥æ社
OEBPS Container Format (OCF) 1.0 æ¥æ¬èªç
OPF 2.0 v1.0 æ¥æ¬èªè¨³ [Open Packaging Format (OPF) 2.0 v1.0]
OPS 2.0 v1.0 æ¥æ¬èªè¨³ [Open Publication Structure (OPS) 2.0 v1.0]
Specifications for the Digital Talking Book
便å©ï¼ãããããªãï¼ãã¼ã«
EPUB manifest validation tool | Appleâs iPad Validate
epubcheck - Validation tool for EPUB - Google Project Hosting
*1:ã»ãã¨ã¯ç»åãã¡ã¤ã«ã¨ã,ã¹ã¿ã¤ã«ã·ã¼ãã¨ããæ ¼ç´ã§ãããã©ç°¡åã®ããçç¥ãã¦ãã