mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 桌面端内置 Pandoc 可执行文件 https://github.com/siyuan-note/siyuan/issues/5835
This commit is contained in:
parent
ffa53aa4f1
commit
d134045a60
13 changed files with 91 additions and 19 deletions
|
|
@ -20,7 +20,6 @@ import (
|
|||
"bytes"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
|
|
@ -135,17 +134,3 @@ func TimeFromID(id string) (ret string) {
|
|||
ret = id[:14]
|
||||
return
|
||||
}
|
||||
|
||||
func IsValidPandocBin(binPath string) bool {
|
||||
if "" == binPath {
|
||||
return false
|
||||
}
|
||||
|
||||
cmd := exec.Command(binPath, "--version")
|
||||
CmdAttr(cmd)
|
||||
data, err := cmd.CombinedOutput()
|
||||
if nil == err && strings.HasPrefix(string(data), "pandoc") {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue