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

EPUB Metadata Support #104

Closed
captn3m0 opened this issue Sep 16, 2020 · 3 comments
Closed

EPUB Metadata Support #104

captn3m0 opened this issue Sep 16, 2020 · 3 comments
Labels
Feature New feature or enhancement

Comments

@captn3m0
Copy link

Feature description

A flag to pass additional EPUB metadata, such as what is supported by pandoc's --metadata flag. This would let us provide details like additional authors/translators/illustrators/publisher/ISBN etc to the generated EPUB file.

Existing workarounds

With some additional tooling - yes.

I generate metadata using epub-metadata-generator, then open the file in Sigil and copy/paste the additional details.

Maybe a --isbn flag that would fetch the metadata using the npm package?

@danburzo danburzo added the Feature New feature or enhancement label Sep 21, 2020
@danburzo
Copy link
Owner

Hi @captn3m0, thanks for the report! (And sorry for the late reply, I was away from the computer last week).

There is a similar open issue for PDFs, and while for PDF we'd prefer some first-class support from Puppeteer/Chromium, in EPUBs we can potentially embed any metadata.

So I guess it's a matter of deciding what metadata we allow and what the command-line options look like, keeping the following in mind:

  • There's already the --title option to specify the publication's title
  • The --individual flag will generate one file per input URL — how will the metadata apply to the files?

@captn3m0
Copy link
Author

The --individual flag will generate one file per input URL — how will the metadata apply to the files?

Applying everywhere sounds like the better deal, since these are likely common things. For non-common items (such as title), --title can be used for now?

Applying nowhere will result in the same problem - no way to add metadata.

Or as a third alternative, mark --metadata flag as invalid in combination with --individual?

So I guess it's a matter of deciding what metadata we allow

I like the pandoc approach of letting the user pass a valid XML file.

danburzo added a commit that referenced this issue Sep 29, 2020
* Use the Buffer returned by Puppeteer's pdf() method directly in PDFDocument
* Add author to EPUB and cover image
* Add --author to README
@danburzo
Copy link
Owner

danburzo commented Mar 7, 2021

Closing this for now. It seems unlikely that percollate will develop in the direction of allowing more than the basic metadata already added to PDFs and EPUBs, as it doesn't fit neatly in the scope of this tool.

@danburzo danburzo closed this as completed Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants