docbook-apps

  • 1.  Epub3 - zip, or not ?

    Posted 08-30-2012 10:22

    I decided to try building an epub from my DocBook document, using epub3 .....
    Following the instructions in the README.

    Step 1. XSL (epub3/chunk.xsl) to generate Xhtml and other files.
    That seems to work fine.

    Step 2. Copy in any image files.
    I wrote some XSL to scan package.opf and generate a batch file to do the copy.
    I don't think XSL (or Saxon) has a built-in ability to copy files, so I build a batch file then run it.

    Step 3. Zip it.
    Ok, so I do the command as in the README -
    zip -r -X mybook.epub mimetype META-INF OEBPS

    And I get -
    'zip' is not recognized as an internal or external command, operable program or batch file.

    So - firstly, if referring to a program that isn't part of the operating system, please explain exactly what is meant.


    Anyway, I thought I recognized the syntax as Info-Zip's zip (I normally use 7-zip) so I set about getting a copy.
    Ok, the download is FTP, which I haven't used for ages. So install Filezilla and try and download an info-zip exe.
    Eventually find an exe, from zip323xn. Add its folder to my Path.

    Then run it ....
    zip -r -X mybook.epub mimetype META-INF OEBPS

    And now I get -
    zip warning: multiple disk information ignored
    <path-to>/Info-Zip/zip232xn/zip.exe: found a preamble of 20832 bytes
    zip warning: name not matched: mybook.epub
    zip I/O error: Permission denied
    zip error: Could not create output file (<path-to>//Info-Zip/zip232xn/zip.exe)


    Ok, so can someone tell me how to actually get this to work ?


    And ......
    Can 7-zip be used for this, if Info-zip's zip is going to give problems ?
    I think I've seen somewhere that "mimetype" should be in the archive but not compressed. Is this so ?
    If so how do we get it not to compress certain files ?


    Frustratedly,
    Richard.







    Richard Kerry
    BNCS Engineer
    T: +44 (0)20 82259063
    M: +44 (0)7812 325518
    Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    richard.kerry@atos.net
    uk.atos.net

    This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.



  • 2.  RE: Epub3 - zip, or not ?

    Posted 08-30-2012 10:50

    OK, so that wasn't quite what I'd done.
    I didn't really want to add zip's folder to my path as I'm not using it for anything else, so I was actually running it by doing

    set zip=<path-to>\Info-Zip\zip232xn\zip.exe

    then not doing
    zip -r -X mybook.epub mimetype META-INF OEBPS

    but actually doing
    %zip% -r -X mybook.epub mimetype META-INF OEBPS

    And that gives the errors I showed before.
    If I add it to my path it is working.

    Though now I'm at step 4 - Validating with epubcheck 3
    and that is giving failures.


    Eventually,
    Richard.




    Richard Kerry
    BNCS Engineer
    T: +44 (0)20 82259063
    M: +44 (0)7812 325518
    Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    richard.kerry@atos.net
    uk.atos.net

    This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

    ________________________________________
    From: Kerry, Richard
    Sent: 30 August 2012 11:22
    To: DocBook Apps Mailing List ?[docbook-apps@lists.oasis-open.org]?
    Subject: Epub3 - zip, or not ?

    I decided to try building an epub from my DocBook document, using epub3 .....
    Following the instructions in the README.

    Step 1. XSL (epub3/chunk.xsl) to generate Xhtml and other files.
    That seems to work fine.

    Step 2. Copy in any image files.
    I wrote some XSL to scan package.opf and generate a batch file to do the copy.
    I don't think XSL (or Saxon) has a built-in ability to copy files, so I build a batch file then run it.

    Step 3. Zip it.
    Ok, so I do the command as in the README -
    zip -r -X mybook.epub mimetype META-INF OEBPS

    And I get -
    'zip' is not recognized as an internal or external command, operable program or batch file.

    So - firstly, if referring to a program that isn't part of the operating system, please explain exactly what is meant.


    Anyway, I thought I recognized the syntax as Info-Zip's zip (I normally use 7-zip) so I set about getting a copy.
    Ok, the download is FTP, which I haven't used for ages. So install Filezilla and try and download an info-zip exe.
    Eventually find an exe, from zip323xn. Add its folder to my Path.

    Then run it ....
    zip -r -X mybook.epub mimetype META-INF OEBPS

    And now I get -
    zip warning: multiple disk information ignored
    <path-to>/Info-Zip/zip232xn/zip.exe: found a preamble of 20832 bytes
    zip warning: name not matched: mybook.epub
    zip I/O error: Permission denied
    zip error: Could not create output file (<path-to>//Info-Zip/zip232xn/zip.exe)


    Ok, so can someone tell me how to actually get this to work ?


    And ......
    Can 7-zip be used for this, if Info-zip's zip is going to give problems ?
    I think I've seen somewhere that "mimetype" should be in the archive but not compressed. Is this so ?
    If so how do we get it not to compress certain files ?


    Frustratedly,
    Richard.







    Richard Kerry
    BNCS Engineer
    T: +44 (0)20 82259063
    M: +44 (0)7812 325518
    Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    richard.kerry@atos.net
    uk.atos.net

    This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.



  • 3.  Re: [docbook-apps] RE: Epub3 - zip, or not ?

    Posted 08-30-2012 20:42
    Richard:

    There are some errors reported by epubcheck that are known to be fixed soon.

    Could you post what are the errors you're getting from validation?

    Carlos

    On Thu, Aug 30, 2012 at 3:50 AM, Kerry, Richard <richard.kerry@atos.net> wrote:
    >
    > OK, so that wasn't quite what I'd done.
    > I didn't really want to add zip's folder to my path as I'm not using it for anything else, so I was actually running it by doing
    >
    > set zip=<path-to>\Info-Zip\zip232xn\zip.exe
    >
    > then not doing
    > zip -r -X mybook.epub mimetype META-INF OEBPS
    >
    > but actually doing
    > %zip% -r -X mybook.epub mimetype META-INF OEBPS
    >
    > And that gives the errors I showed before.
    > If I add it to my path it is working.
    >
    > Though now I'm at step 4 - Validating with epubcheck 3
    > and that is giving failures.
    >
    >
    > Eventually,
    > Richard.
    >
    >
    >
    >
    > Richard Kerry
    > BNCS Engineer
    > T: +44 (0)20 82259063
    > M: +44 (0)7812 325518
    > Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    > richard.kerry@atos.net
    > uk.atos.net
    >
    > This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
    >
    > ________________________________________
    > From: Kerry, Richard
    > Sent: 30 August 2012 11:22
    > To: DocBook Apps Mailing List ?[docbook-apps@lists.oasis-open.org]?
    > Subject: Epub3 - zip, or not ?
    >
    > I decided to try building an epub from my DocBook document, using epub3 .....
    > Following the instructions in the README.
    >
    > Step 1. XSL (epub3/chunk.xsl) to generate Xhtml and other files.
    > That seems to work fine.
    >
    > Step 2. Copy in any image files.
    > I wrote some XSL to scan package.opf and generate a batch file to do the copy.
    > I don't think XSL (or Saxon) has a built-in ability to copy files, so I build a batch file then run it.
    >
    > Step 3. Zip it.
    > Ok, so I do the command as in the README -
    > zip -r -X mybook.epub mimetype META-INF OEBPS
    >
    > And I get -
    > 'zip' is not recognized as an internal or external command, operable program or batch file.
    >
    > So - firstly, if referring to a program that isn't part of the operating system, please explain exactly what is meant.
    >
    >
    > Anyway, I thought I recognized the syntax as Info-Zip's zip (I normally use 7-zip) so I set about getting a copy.
    > Ok, the download is FTP, which I haven't used for ages. So install Filezilla and try and download an info-zip exe.
    > Eventually find an exe, from zip323xn. Add its folder to my Path.
    >
    > Then run it ....
    > zip -r -X mybook.epub mimetype META-INF OEBPS
    >
    > And now I get -
    > zip warning: multiple disk information ignored
    > <path-to>/Info-Zip/zip232xn/zip.exe: found a preamble of 20832 bytes
    > zip warning: name not matched: mybook.epub
    > zip I/O error: Permission denied
    > zip error: Could not create output file (<path-to>//Info-Zip/zip232xn/zip.exe)
    >
    >
    > Ok, so can someone tell me how to actually get this to work ?
    >
    >
    > And ......
    > Can 7-zip be used for this, if Info-zip's zip is going to give problems ?
    > I think I've seen somewhere that "mimetype" should be in the archive but not compressed. Is this so ?
    > If so how do we get it not to compress certain files ?
    >
    >
    > Frustratedly,
    > Richard.
    >
    >
    >
    >
    >
    >
    >
    > Richard Kerry
    > BNCS Engineer
    > T: +44 (0)20 82259063
    > M: +44 (0)7812 325518
    > Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    > richard.kerry@atos.net
    > uk.atos.net
    >
    > This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >



  • 4.  RE: [docbook-apps] RE: Epub3 - zip, or not ?

    Posted 08-31-2012 10:11

    The output is as follows (slightly edited for clarity - shortened some names, hope it's still clear)

    >java -jar C:\EPubcheck\epubcheck-3.0b5\epubcheck-3.0b5.jar Output/alm_acq.epub
    Epubcheck Version 3.0b5
    Validating against EPUB version 3.0
    WARNING: Output/alm_acq.epub/OEBPS/package.opf(16,39): date value '28 April 2009' does not follow recommended syntax as per http://www.w3.org/TR/NOTE-datetime:[For input string: "28 April 2009"] is not an integer
    ERROR: Output/alm_acq.epub/OEBPS/package.opf(18,16): element "dc:date" not allowed here; expected the element end-tag or element "dc:contributor", "dc:coverage", "dc:creator", "dc:description", "dc:format", "dc:identifier", "dc:language", "dc:publisher", "dc:relation", "dc:rights", "dc:source", "dc:subject", "dc:title", "dc:type", "link" or "meta"
    WARNING: Output/alm_acq.epub/OEBPS/package.opf(18,42): date value '19 November 2003' does not follow recommended syntax as per http://www.w3.org/TR/NOTE-datetime:[For input string: "19 November 2003"] is not an integer
    Check finished with warnings or errors

    It looks like the dc:date (or possibly ) warnings are due to revision history entries with revision/date elements in the format '28 April 2009' and '19 November 2003' .
    Looking at 'www.w3.org/TR/NOTE-datetime' it looks like dates need to be in YYYY-MM-DD format. I've found (in epub3/epub3-element-mode.xsl) and , so it looks like this format is missing a conversion of dates into the required format.

    I am getting two dc:date elements in package.opf. The ERROR above can be fixed by removing one of them.



    The relevant part of package.opf is this (within the 'metadata' element):

    28 April 2009
    <dc:date>28 April 2009</dc:date>
    19 November 2003
    <dc:date>19 November 2003</dc:date>





    Hope that helps,

    Regards,

    Richard.





    Richard Kerry
    BNCS Engineer
    T: +44 (0)20 82259063
    M: +44 (0)7812 325518
    Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    richard.kerry@atos.net
    uk.atos.net

    This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.



    From: Carlos Araya [carlos.araya@gmail.com]
    Sent: 30 August 2012 21:41
    To: Kerry, Richard
    Cc: DocBook Apps Mailing List ?[docbook-apps@lists.oasis-open.org]?
    Subject: Re: [docbook-apps] RE: Epub3 - zip, or not ?



    Richard:

    There are some errors reported by epubcheck that are known to be fixed soon.

    Could you post what are the errors you're getting from validation?

    Carlos

    On Thu, Aug 30, 2012 at 3:50 AM, Kerry, Richard <richard.kerry@atos.net> wrote:
    >
    > OK, so that wasn't quite what I'd done.
    > I didn't really want to add zip's folder to my path as I'm not using it for anything else, so I was actually running it by doing
    >
    > set zip=<path-to>\Info-Zip\zip232xn\zip.exe
    >
    > then not doing
    > zip -r -X mybook.epub mimetype META-INF OEBPS
    >
    > but actually doing
    > %zip% -r -X mybook.epub mimetype META-INF OEBPS
    >
    > And that gives the errors I showed before.
    > If I add it to my path it is working.
    >
    > Though now I'm at step 4 - Validating with epubcheck 3
    > and that is giving failures.
    >
    >
    > Eventually,
    > Richard.
    >
    >
    >
    >
    > Richard Kerry
    > BNCS Engineer
    > T: +44 (0)20 82259063
    > M: +44 (0)7812 325518
    > Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    > richard.kerry@atos.net
    > uk.atos.net
    >
    > This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
    >
    > ________________________________________
    > From: Kerry, Richard
    > Sent: 30 August 2012 11:22
    > To: DocBook Apps Mailing List ?[docbook-apps@lists.oasis-open.org]?
    > Subject: Epub3 - zip, or not ?
    >
    > I decided to try building an epub from my DocBook document, using epub3 .....
    > Following the instructions in the README.
    >
    > Step 1. XSL (epub3/chunk.xsl) to generate Xhtml and other files.
    > That seems to work fine.
    >
    > Step 2. Copy in any image files.
    > I wrote some XSL to scan package.opf and generate a batch file to do the copy.
    > I don't think XSL (or Saxon) has a built-in ability to copy files, so I build a batch file then run it.
    >
    > Step 3. Zip it.
    > Ok, so I do the command as in the README -
    > zip -r -X mybook.epub mimetype META-INF OEBPS
    >
    > And I get -
    > 'zip' is not recognized as an internal or external command, operable program or batch file.
    >
    > So - firstly, if referring to a program that isn't part of the operating system, please explain exactly what is meant.
    >
    >
    > Anyway, I thought I recognized the syntax as Info-Zip's zip (I normally use 7-zip) so I set about getting a copy.
    > Ok, the download is FTP, which I haven't used for ages. So install Filezilla and try and download an info-zip exe.
    > Eventually find an exe, from zip323xn. Add its folder to my Path.
    >
    > Then run it ....
    > zip -r -X mybook.epub mimetype META-INF OEBPS
    >
    > And now I get -
    > zip warning: multiple disk information ignored
    > <path-to>/Info-Zip/zip232xn/zip.exe: found a preamble of 20832 bytes
    > zip warning: name not matched: mybook.epub
    > zip I/O error: Permission denied
    > zip error: Could not create output file (<path-to>//Info-Zip/zip232xn/zip.exe)
    >
    >
    > Ok, so can someone tell me how to actually get this to work ?
    >
    >
    > And ......
    > Can 7-zip be used for this, if Info-zip's zip is going to give problems ?
    > I think I've seen somewhere that "mimetype" should be in the archive but not compressed. Is this so ?
    > If so how do we get it not to compress certain files ?
    >
    >
    > Frustratedly,
    > Richard.
    >
    >
    >
    >
    >
    >
    >
    > Richard Kerry
    > BNCS Engineer
    > T: +44 (0)20 82259063
    > M: +44 (0)7812 325518
    > Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    > richard.kerry@atos.net
    > uk.atos.net
    >
    > This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >



  • 5.  Re: [docbook-apps] Epub3 - zip, or not ?

    Posted 08-31-2012 02:39
    Zip is just a compression format. "zip" is the Info-zip program to create
    and manipulate zip files. 7-zip can create zip files so you just need to
    adapt the CLI args to add the files you need to a zip archive with an
    extension of '.epub'

    On Thu, Aug 30, 2012 at 3:22 AM, Kerry, Richard <richard.kerry@atos.net>wrote:

    >
    > I decided to try building an epub from my DocBook document, using epub3
    > .....
    > Following the instructions in the README.
    >
    > Step 1. XSL (epub3/chunk.xsl) to generate Xhtml and other files.
    > That seems to work fine.
    >
    > Step 2. Copy in any image files.
    > I wrote some XSL to scan package.opf and generate a batch file to do
    > the copy.
    > I don't think XSL (or Saxon) has a built-in ability to copy files, so
    > I build a batch file then run it.
    >
    > Step 3. Zip it.
    > Ok, so I do the command as in the README -
    > zip -r -X mybook.epub mimetype META-INF OEBPS
    >
    > And I get -
    > 'zip' is not recognized as an internal or external command, operable
    > program or batch file.
    >
    > So - firstly, if referring to a program that isn't part of the operating
    > system, please explain exactly what is meant.
    >
    >
    > Anyway, I thought I recognized the syntax as Info-Zip's zip (I normally
    > use 7-zip) so I set about getting a copy.
    > Ok, the download is FTP, which I haven't used for ages. So install
    > Filezilla and try and download an info-zip exe.
    > Eventually find an exe, from zip323xn. Add its folder to my Path.
    >
    > Then run it ....
    > zip -r -X mybook.epub mimetype META-INF OEBPS
    >
    > And now I get -
    > zip warning: multiple disk information ignored
    > <path-to>/Info-Zip/zip232xn/zip.exe: found a preamble of 20832 bytes
    > zip warning: name not matched: mybook.epub
    > zip I/O error: Permission denied
    > zip error: Could not create output file
    > (<path-to>//Info-Zip/zip232xn/zip.exe)
    >
    >
    > Ok, so can someone tell me how to actually get this to work ?
    >
    >
    > And ......
    > Can 7-zip be used for this, if Info-zip's zip is going to give problems ?
    > I think I've seen somewhere that "mimetype" should be in the archive but
    > not compressed. Is this so ?
    > If so how do we get it not to compress certain files ?
    >
    >
    > Frustratedly,
    > Richard.
    >
    >
    >
    >
    >
    >
    >
    > Richard Kerry
    > BNCS Engineer
    > T: +44 (0)20 82259063
    > M: +44 (0)7812 325518
    > Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    > richard.kerry@atos.net
    > uk.atos.net
    >
    > This e-mail and the documents attached are confidential and intended
    > solely for the addressee; it may also be privileged. If you receive this
    > e-mail in error, please notify the sender immediately and destroy it. As
    > its integrity cannot be secured on the Internet, the Atos group liability
    > cannot be triggered for the message content. Although the sender endeavours
    > to maintain a computer virus-free network, the sender does not warrant that
    > this transmission is virus-free and will not be liable for any damages
    > resulting from any virus transmitted.
    >
    > ---------------------------------------------------------------------
    > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
    >
    >



  • 6.  RE: [docbook-apps] Epub3 - zip, or not ?

    Posted 08-31-2012 11:52


    >"zip" is the Info-zip program to create and manipulate zip files.



    I know that (and I already knew it), but ....

    note to the maintainers of the documentation - please state it explicitly; as I indicated I got the "'zip' is not recognized as an internal or external command, operable program or batch file." message as it isn't a standard operating system file. Someone reading this who isn't a developer may not know what's meant.

    Also please add a note to the effect that its folder *must* be in your path. Just adding a symbol pointing to zip.exe is not sufficient. Presumably there is something else important in the folder.



    I've been trying to get 7-zip to do the job.

    Firstly it needs telling to do "zip" format, which can be done using -tzip.

    However, it seems to be insisting on putting everything in the file in alphabetical order, which isn't accepted by epubcheck.



    So for the moment the answer seems to be that 7-zip can't build epubs. Unless someone can tell me how to sort out the ordering.





    Unhelpfully,

    Richard.










    [Blue line]
    Richard Kerry
    BNCS Engineer
    T: +44 (0)20 82259063
    M: +44 (0)7812 325518
    Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    richard.kerry@atos.net<https://webmail.siemens-it-solutions.com/owa/redir.aspx?C=9fb20d019e3e4cb99344d708709a3177&URL=mailto%3arichard.kerry%40atos.net>
    uk.atos.net<https://webmail.siemens-it-solutions.com/owa/redir.aspx?C=9fb20d019e3e4cb99344d708709a3177&URL=http%3a%2f%2fuk.atos.net%2fen-uk%2f>
    [Atos logo]
    This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
    ________________________________
    From: Kevin O. Grover [kevin@kevingrover.net]
    Sent: 31 August 2012 03:39
    To: Kerry, Richard
    Cc: DocBook Apps Mailing List ?[docbook-apps@lists.oasis-open.org]?
    Subject: Re: [docbook-apps] Epub3 - zip, or not ?

    Zip is just a compression format. "zip" is the Info-zip program to create and manipulate zip files. 7-zip can create zip files so you just need to adapt the CLI args to add the files you need to a zip archive with an extension of '.epub'

    On Thu, Aug 30, 2012 at 3:22 AM, Kerry, Richard <richard.kerry@atos.net<mailto:richard.kerry@atos.net>> wrote:

    I decided to try building an epub from my DocBook document, using epub3 .....
    Following the instructions in the README.

    Step 1. XSL (epub3/chunk.xsl) to generate Xhtml and other files.
    That seems to work fine.

    Step 2. Copy in any image files.
    I wrote some XSL to scan package.opf and generate a batch file to do the copy.
    I don't think XSL (or Saxon) has a built-in ability to copy files, so I build a batch file then run it.

    Step 3. Zip it.
    Ok, so I do the command as in the README -
    zip -r -X mybook.epub mimetype META-INF OEBPS

    And I get -
    'zip' is not recognized as an internal or external command, operable program or batch file.

    So - firstly, if referring to a program that isn't part of the operating system, please explain exactly what is meant.


    Anyway, I thought I recognized the syntax as Info-Zip's zip (I normally use 7-zip) so I set about getting a copy.
    Ok, the download is FTP, which I haven't used for ages. So install Filezilla and try and download an info-zip exe.
    Eventually find an exe, from zip323xn. Add its folder to my Path.

    Then run it ....
    zip -r -X mybook.epub mimetype META-INF OEBPS

    And now I get -
    zip warning: multiple disk information ignored
    <path-to>/Info-Zip/zip232xn/zip.exe: found a preamble of 20832 bytes
    zip warning: name not matched: mybook.epub
    zip I/O error: Permission denied
    zip error: Could not create output file (<path-to>//Info-Zip/zip232xn/zip.exe)


    Ok, so can someone tell me how to actually get this to work ?


    And ......
    Can 7-zip be used for this, if Info-zip's zip is going to give problems ?
    I think I've seen somewhere that "mimetype" should be in the archive but not compressed. Is this so ?
    If so how do we get it not to compress certain files ?


    Frustratedly,
    Richard.







    Richard Kerry
    BNCS Engineer
    T: +44 (0)20 82259063
    M: +44 (0)7812 325518
    Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    richard.kerry@atos.net<mailto:richard.kerry@atos.net>
    uk.atos.net<http://uk.atos.net/>

    This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org<mailto:docbook-apps-unsubscribe@lists.oasis-open.org>
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org<mailto:docbook-apps-help@lists.oasis-open.org>





  • 7.  Re: [docbook-apps] Epub3 - zip, or not ?

    Posted 08-31-2012 12:12
    On 08/31/2012 12:51 PM, Kerry, Richard wrote:
    >
    >
    >> "zip" is the Info-zip program to create and manipulate zip files.
    >
    >
    >
    > I know that (and I already knew it), but ....
    >
    > note to the maintainers of the documentation - please state it explicitly; as I indicated I got the "'zip' is not recognized as an internal or external command, operable program or batch file." message as it isn't a standard operating system file. Someone reading this who isn't a developer may not know what's meant.
    >
    > Also please add a note to the effect that its folder *must* be in your path. Just adding a symbol pointing to zip.exe is not sufficient. Presumably there is something else important in the folder.
    >

    How far do you take this Kerry? Insist that java be on the $PATH? That
    permissions be set for local directories?

    There has to be a break point somewhere.
    "it isn't a standard operating system file." It is, on my Operating
    System? Shades of grey everywhere?





    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk



  • 8.  RE: [docbook-apps] Epub3 - zip, or not ?

    Posted 08-31-2012 14:48
    >How far do you take this Kerry?
    >Insist that java be on the $PATH?

    There's a lot of discussion in Bob's book, and elsewhere, about how to get Xslt processors working. That tends to include a bit about getting Java running as so many are Java-based.

    >That permissions be set for local directories?
    You wouldn't have got that far with them set wrong.

    They are an issue that applies to (nearly) all computer work. This is the first time ever, in many years working with computers, that I've found somethiing with a specific requirement of which zip utility is used. (or which one isn't)

    >There has to be a break point somewhere.
    Yes.
    But the program in question is not standard in (probably) the most widely used operating system. All I really wanted was slightly more information on what to use and how to get it going. As I mentioned in another response my usual zip program, 7-zip, can't do the job. I could have saved a morning's experimentation if someone had documented that. A Google search shows that others have already discovered this so it'd be helpful if the central point for DocBook generation of epubs, ie the Readme file in the epub(3) directory of the docbook-xsl project, mentioned it.

    And speaking as someone who doesn't like cluttering up the PATH with folders for rarely-used programs I always try and run things directly from their homes, rather than via path. In this case (unusually I think) the program appears to work when run directly but turns out not to be able to run properly unless accessed via PATH, something discovered only after a period of experimentation.

    >"it isn't a standard operating system file." It is, on my Operating System?

    Oh, what operating system is that then ?
    Don't think any version of Windows has it.

    >Shades of grey everywhere?

    How many ?
    It gets absolutely everywhere doesn't it ?
    Aaarghh ......... didn't think that could creep into this list !




    Uncertainly,
    Richard.




    Richard Kerry
    BNCS Engineer
    T: +44 (0)20 82259063
    M: +44 (0)7812 325518
    Room EBX 301, BBC Television Centre, Wood Lane, London, W12 7RJ
    richard.kerry@atos.net
    uk.atos.net

    This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos group liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.



    From: DaveP [davep@dpawson.co.uk]
    Sent: 31 August 2012 13:12
    To: docbook-apps@lists.oasis-open.org
    Subject: Re: [docbook-apps] Epub3 - zip, or not ?


    On 08/31/2012 12:51 PM, Kerry, Richard wrote:
    >
    >
    >> "zip" is the Info-zip program to create and manipulate zip files.
    >
    >
    >
    > I know that (and I already knew it), but ....
    >
    > note to the maintainers of the documentation - please state it explicitly; as I indicated I got the "'zip' is not recognized as an internal or external command, operable program or batch file." message as it isn't a standard operating system file. Someone reading this who isn't a developer may not know what's meant.
    >
    > Also please add a note to the effect that its folder *must* be in your path. Just adding a symbol pointing to zip.exe is not sufficient. Presumably there is something else important in the folder.
    >

    How far do you take this Kerry? Insist that java be on the $PATH? That
    permissions be set for local directories?

    There has to be a break point somewhere.
    "it isn't a standard operating system file." It is, on my Operating
    System? Shades of grey everywhere?





    regards

    --
    Dave Pawson
    XSLT XSL-FO FAQ.
    http://www.dpawson.co.uk

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
    For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org