osx - Creating epub with a2x versus ZIP -


using a2x command creates valid .epub file (book.epub):

$ a2x -v -k -f epub -d book book.asc a2x: archiving: mimetype a2x: archiving: meta-inf/container.xml a2x: archiving: oebps/ch01.html a2x: archiving: oebps/ch02.html a2x: archiving: oebps/content.opf a2x: archiving: oebps/docbook-xsl.css a2x: archiving: oebps/index.html a2x: archiving: oebps/pr01.html a2x: archiving: oebps/toc.ncx 

however, if try manually create .epub archive using artifacts (contained in book.epub.d) of a2x command , zip command, resulting .epub file not valid:

$ zip -vr book.epub book.epub.d/ -x "*.ds_store"   adding: book.epub.d/  (in=0) (out=0) (stored 0%)   adding: book.epub.d/meta-inf/ (in=0) (out=0) (stored 0%)   adding: book.epub.d/meta-inf/container.xml    (in=255) (out=175) (deflated 31%)   adding: book.epub.d/mimetype  (in=20) (out=20) (stored 0%)   adding: book.epub.d/oebps/    (in=0) (out=0) (stored 0%)   adding: book.epub.d/oebps/ch01.html   (in=1161) (out=686) (deflated 41%)   adding: book.epub.d/oebps/ch02.html   (in=679) (out=414) (deflated 39%)   adding: book.epub.d/oebps/content.opf (in=1288) (out=476) (deflated 63%)   adding: book.epub.d/oebps/docbook-xsl.css (in=5738) (out=1518) (deflated 74%)   adding: book.epub.d/oebps/index.html  (in=1156) (out=590) (deflated 49%)   adding: book.epub.d/oebps/pr01.html   (in=770) (out=485) (deflated 37%)   adding: book.epub.d/oebps/toc.ncx (in=772) (out=325) (deflated 58%) 

i suspect because archive's files include book.epub.d in paths. there way exclude this?

here command have used successfully:

zip -xr epubfilename.epub mimetype  meta-inf oebps -x \*.ds_store 

this places files in right order (mime type first, meta-inf container.xml next, else) , excludes .ds_store since looks on mac.

note need within book.epub.d directory in example produce correct output.

i recommend double checking results epubcheck (https://github.com/idpf/epubcheck or http://validator.idpf.org) if not doing so.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -