Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Do we manually add metadata to the finished epub files #8

Open
sethwoodworth opened this issue Jul 27, 2015 · 8 comments
Open
Labels

Comments

@sethwoodworth
Copy link
Contributor

I am worried we can't put a version into the epub files. We should know the git commit or tag that built the book.

How hard is it to add this metadata directly to the final epub file? Can we implement this in time?

@rdhyee
Copy link
Contributor

rdhyee commented Jul 28, 2015

I know that in travis.yml right now, we're adding stuff to epub file -- don't remember whether there is a manifest in epub that we should be / (must be?) updating whenever we add files, directories to an epub. @eshellman -- do you remember whether we can just add extra files to an epub while keeping epub readers and/or epub validators (like epubcheck) happy?

@rdhyee
Copy link
Contributor

rdhyee commented Jul 28, 2015

Partially answering my own question. When I run epubcheck (v 3.0.1) on https://github.com/GITenberg/Adventures-of-Huckleberry-Finn_76/releases/download/v0.0.3/Adventures-of-Huckleberry-Finn.epub, I get the following WARNINGS (but not ERRORS):

Epubcheck Version 3.0.1

Validating against EPUB version 3.0
WARNING: /Users/raymondyee/Downloads/Adventures-of-Huckleberry-Finn.epub: item (OEBPS/images/cover.jpg) exists in the zip file, but is not declared in the OPF file
WARNING: /Users/raymondyee/Downloads/Adventures-of-Huckleberry-Finn.epub: item (OEBPS/images/bookcover.jpg) exists in the zip file, but is not declared in the OPF file
WARNING: /Users/raymondyee/Downloads/Adventures-of-Huckleberry-Finn.epub: item (OEBPS/images/titlepage.jpg) exists in the zip file, but is not declared in the OPF file
WARNING: /Users/raymondyee/Downloads/Adventures-of-Huckleberry-Finn.epub: item (OEBPS/images/frontispiece.jpg) exists in the zip file, but is not declared in the OPF file
WARNING: /Users/raymondyee/Downloads/Adventures-of-Huckleberry-Finn.epub: item (OEBPS/images/notice.jpg) exists in the zip file, but is not declared in the OPF file

@eshellman
Copy link
Contributor

I strongly recommend using something like pyepub to manipulate epub files.

On Jul 28, 2015, at 2:12 PM, Raymond Yee [email protected] wrote:

I know that in travis.yml right now, we're adding stuff to epub file -- don't remember whether there is a manifest in epub that we should be / (must be?) updating whenever we add files, directories to an epub. @eshellman https://github.com/eshellman -- do you remember whether we can just add extra files to an epub while keeping epub readers and/or epub validators (like epubcheck) happy?


Reply to this email directly or view it on GitHub #8 (comment).

@sethwoodworth
Copy link
Contributor Author

Good catch. We should:

  • start a gitenberg-dev repo that contains a fork of pyepub
  • add scripts to that repo:
    • add files to odf
    • adds metadata (however we figure out this should work

@eshellman
Copy link
Contributor

look at https://github.com/Gluejar/regluit/blob/master/core/epub.py
https://github.com/Gluejar/regluit/blob/master/core/epub.py

https://github.com/Gluejar/regluit/blob/master/core/epub.py
f https://github.com/Gluejar/regluit/blob/master/core/epub.pyor examples.

On Jul 28, 2015, at 3:29 PM, Seth Woodworth [email protected] wrote:

Good catch. We should:

start a gitenberg-dev repo that contains a fork of pyepub https://github.com/Gluejar/pyepub
add scripts to that repo:
add files to odf
adds metadata (however we figure out this should work

Reply to this email directly or view it on GitHub #8 (comment).

@rdhyee
Copy link
Contributor

rdhyee commented Jul 28, 2015

@eshellman's idea to use pyepub makes sense -- it should take care of the manifest. How much of a priority is it to get the manifest right by using pyepub?

@eshellman
Copy link
Contributor

a bad manifest will cause kindlegen to choke

On Jul 28, 2015, at 3:49 PM, Raymond Yee [email protected] wrote:

@eshellman https://github.com/eshellman's idea to use pyepub makes sense -- it should take care of the manifest. How much of a priority is it to get the manifest right by using pyepub?


Reply to this email directly or view it on GitHub #8 (comment).

@rdhyee
Copy link
Contributor

rdhyee commented Jul 28, 2015

Does kindlegen choke on the latest release for Huck Finn?
On Jul 28, 2015 1:05 PM, "eshellman" [email protected] wrote:

a bad manifest will cause kindlegen to choke

On Jul 28, 2015, at 3:49 PM, Raymond Yee [email protected]
wrote:

@eshellman https://github.com/eshellman's idea to use pyepub makes
sense -- it should take care of the manifest. How much of a priority is it
to get the manifest right by using pyepub?


Reply to this email directly or view it on GitHub <
#8 (comment)
.


Reply to this email directly or view it on GitHub
#8 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants