JessicaTegner/pypandoc

How do I add information about the author, cover, etc. of an .epub file?

EndPain opened this issue · 2 comments

Hello,First of all, thank you for making a great project, I'm using it and want to convert .md markdown files to .epub files, but I want to additionally add author and cover image information to .epub files, is there a way to operate it? Please answer me!

Hi there.

To find your answer, you'll have to look into the pandoc user guide, as this is only a wrapper.
As example, I looked in the guide, and found the following:

--epub-cover-image=FILE
Use the specified image as the EPUB cover. It is recommended that the image be less than 1000px in width and height. Note that in a Markdown source document you can also specify cover-image in a YAML metadata block (see EPUB Metadata, below).
--epub-metadata=FILE
Look in the specified XML file for metadata for the EPUB. The file should contain a series of Dublin Core elements. For example:
dc:rightsCreative Commons</dc:rights>
dc:languagees-AR</dc:language>
By default, pandoc will include the following metadata elements: dc:title (from the document title), dc:creator (from the document authors), dc:date (from the document date, which should be in ISO 8601 format), dc:language (from the lang variable, or, if is not set, the locale), and <dc:identifier id="BookId"> (a randomly generated UUID). Any of these may be overridden by elements in the metadata file.
Note: if the source document is Markdown, a YAML metadata block in the document can be used instead. See below under EPUB Metadata.

Source

Thank you very much