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

Can't export markdown file with attachment #150

Closed
xjl456852 opened this issue Jan 10, 2024 · 5 comments
Closed

Can't export markdown file with attachment #150

xjl456852 opened this issue Jan 10, 2024 · 5 comments

Comments

@xjl456852
Copy link

Can't export markdown file with attachment

The output dir does have resources dir, it's didn't create the resources dir.
It only export the markdown file.

The parameter is
-f markdown --resource-path="${vaultDir}" --resource-path="${currentDir}" --resource-path="${attachmentFolderPath}" --lua-filter="${luaDir}/markdown.lua" -s -o "${outputPath}" -t commonmark_x-attributes

Thank you

@mokeyish
Copy link
Owner

The information provided is too little. It should be possible to export with attachments. TextBundle exports markdown with attachments to a folder.

@xjl456852
Copy link
Author

原来大家都是中国人啊.
导出中尝试了导出为markdown的三种方式Markdown, Markdown(hugo), TextBundle,都无法将附件图片导出
image

使用TextBundle还报错
image

文件内容:
image

文件和图片仓库的位置如下
image

现在无法直接导出带图片的文件

@brunoamaral
Copy link

brunoamaral commented Jan 24, 2024

I just had the same problem with a docx file.

Command: /opt/homebrew/bin/pandoc -f markdown --resource-path="/Users/brunoamaral/Library/Mobile Documents/iCloud~md~obsidian/Documents/ExoCortex/Artigos/ESCS" --resource-path="Files" -s -o "/Users/brunoamaral/Downloads/IA nas Relações Públicas, da Estratégia de Comunicagao a geração de
output.docx" -t docx --citeproc --bibliography "/Users/brunoamaral/Documents/zotero-references.json" --csl
"/Users/brunoamaral/Zotero/styles/apa.csl"

"/Users/brunoamaral/Library/Mobile Documents/iCloud~md~obsidian/Documents/ExoCortex/Artigos/ESCS/IA nas Relações Públicas, da Estratégia de Comunicagao a geração de output.md", Error:[ WARNING] Could not fetch resource 53404929226 _b8343b5828_o0.jpg: replacing image with description

Aside from both me and @xjl456852 using different character sets, I noticed that the path to the Files vault where I keep the attachments is not an absolute path. I'm using iCloud if that is relevant.

@mokeyish
Copy link
Owner

mokeyish commented Feb 2, 2024

This is because:

Accessing this variable in custom writers is deprecated. Starting with pandoc 3.0, it is set to a placeholder value (the default options) in custom writers. Access to the actual writer options is provided via the Writer or ByteStringWriter function, to which the options are passed as the second function argument.

jgm/pandoc#9404

@mokeyish
Copy link
Owner

mokeyish commented Feb 2, 2024

#157

@mokeyish mokeyish closed this as completed Feb 2, 2024
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

3 participants