From 92504ab28099e4f5ba9f99c98c82205a3d5ac3e3 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 31 Oct 2024 11:52:41 +0800 Subject: [PATCH] :bug: OCR function cannot be used normally on Linux https://github.com/siyuan-note/siyuan/issues/12960 --- kernel/util/ocr.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/util/ocr.go b/kernel/util/ocr.go index ab045c1368d..8dadbf4024e 100644 --- a/kernel/util/ocr.go +++ b/kernel/util/ocr.go @@ -228,9 +228,10 @@ func Tesseract(imgAbsPath string) (ret []map[string]interface{}) { } tsv := string(output) - logging.LogInfof("tesseract [path=%s] success [%s]", imgAbsPath, tsv) + //logging.LogInfof("tesseract [path=%s] success [%s]", imgAbsPath, tsv) // 按行分割 TSV 数据 + tsv = strings.ReplaceAll(tsv, "\r", "") lines := strings.Split(tsv, "\n") // 解析 TSV 数据 跳过标题行,从第二行开始处理