mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 07:18:49 +01:00
🎨 Support for exporting ODT Fix https://github.com/siyuan-note/siyuan/issues/8133
This commit is contained in:
parent
a52cf1eb29
commit
847be4b939
5 changed files with 40 additions and 5 deletions
|
|
@ -2029,15 +2029,17 @@ func exportPandocConvertZip(boxID, baseFolderName string, docPaths []string,
|
|||
}
|
||||
|
||||
// 调用 Pandoc 进行格式转换
|
||||
output, err := util.Pandoc(pandocFrom, pandocTo, md)
|
||||
output, err := util.Pandoc(pandocFrom, pandocTo, writePath, md)
|
||||
if nil != err {
|
||||
logging.LogErrorf("pandoc failed: %s", err)
|
||||
continue
|
||||
}
|
||||
|
||||
if err := gulu.File.WriteFileSafer(writePath, gulu.Str.ToBytes(output), 0644); nil != err {
|
||||
logging.LogErrorf("write export markdown file [%s] failed: %s", writePath, err)
|
||||
continue
|
||||
if "odt" != pandocTo && "epub" != pandocTo && "rtf" != pandocTo {
|
||||
if err := gulu.File.WriteFileSafer(writePath, gulu.Str.ToBytes(output), 0644); nil != err {
|
||||
logging.LogErrorf("write export markdown file [%s] failed: %s", writePath, err)
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
// 解析导出后的标准 Markdown,汇总 assets
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue