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

[BUG] Unknown option --metadata-file #74

Open
fglo opened this issue Sep 15, 2021 · 4 comments
Open

[BUG] Unknown option --metadata-file #74

fglo opened this issue Sep 15, 2021 · 4 comments

Comments

@fglo
Copy link

fglo commented Sep 15, 2021

When I try to export a note obsidian-pandoc return an error:
Pandoc export failed: Unknown option --metadata-file. Try pandoc --help for more information.

image

Easy fix is to comment this lines in main.js but it's not ideal:

if (input.metadataFile)
        args.push('--metadata-file', input.metadataFile);

I work o Windows 10
pandoc --version output:

pandoc 2.2.3.2
Compiled with pandoc-types 1.17.5.1, texmath 0.11.0.1, skylighting 0.7.2
Default user data directory: C:\Users\user\AppData\Roaming\pandoc
Copyright (C) 2006-2018 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
@lukeaust
Copy link

Simple but very effective

@Koala
Copy link

Koala commented Dec 2, 2022

The --metadata-file option is only available as of Pandoc version 2.3 (2018-09-16): https://pandoc.org/releases.html#pandoc-2.3-2018-09-16

Add --metadata-file option (Mauro Bieg, #1960), which allows users to specify metadata in a YAML file, regardless of the input format (#1960).

This error message problem can be considered fixed only by checking if Pandoc can be used in version 2.3 or higher.


It took me a few hours to get to the root cause. So that this doesn't happen to others, this note should be included on the troubleshooting page:
https://github.com/OliverBalfour/obsidian-pandoc/wiki/Troubleshooting


My version: pandoc 2.2.1
Debian 10

@tonypeng1
Copy link

I got the same error. The issue was resolved by changing the Pandoc Plugin setting "Export files from HTML or markdown?" from HTML to markdown.

image

@tonypeng1
Copy link

Another way is to select all content in a note, copy it, and directly paste to a new Word document. The results appear good.

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

No branches or pull requests

4 participants