mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🐛 加入诊断日志 macOS 端 Tesseract OCR 安装后不识别 https://github.com/siyuan-note/siyuan/issues/7107
This commit is contained in:
parent
82145475a8
commit
16c489356f
1 changed files with 5 additions and 0 deletions
|
|
@ -144,6 +144,11 @@ func getTesseractVer() (ret string) {
|
|||
cmd := exec.Command("tesseract", "--version")
|
||||
gulu.CmdAttr(cmd)
|
||||
data, err := cmd.CombinedOutput()
|
||||
if nil != err {
|
||||
logging.LogErrorf("get tesseract version failed: %s", err)
|
||||
return
|
||||
}
|
||||
logging.LogInfof("tesseract version: %s", string(data))
|
||||
if nil == err && strings.HasPrefix(string(data), "tesseract ") {
|
||||
parts := bytes.Split(data, []byte("\n"))
|
||||
if 0 < len(parts) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue