Skip to content

[EPUB] How to set meta data? #383

Closed
Closed
@Shohreh

Description

@Shohreh

Hello,

I just installed and tried pypandoc, but I can't figure out how to set metadata in the EPUB output file

os.environ.setdefault('PYPANDOC_PANDOC', r'c:\Apps\Pandoc\pandoc.exe')
#print(pypandoc.get_pandoc_version())

#OK output = pypandoc.convert_file(TEMPFILE, 'epub', outputfile=OUTPUTFILE)

#RuntimeError: Pandoc died with exitcode "6" during conversion: Unknown option --metadata title.
#output = pypandoc.convert_file(TEMPFILE,format='html',to='epub',encoding='utf-8',outputfile=OUTPUTFILE, extra_args=['--metadata title=f"{TITLE}"'])

#RuntimeError: Pandoc died with exitcode "6" during conversion: Unknown option --metadata title.
output = pypandoc.convert_file(TEMPFILE,format='html',to='epub',outputfile=OUTPUTFILE, extra_args=['--metadata title="blah"'])

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions