mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-12 10:14:21 +01:00
🎨 桌面端支持搜索图片 OCR 文本 https://github.com/siyuan-note/siyuan/issues/3470
This commit is contained in:
parent
c4208596e4
commit
ae09673a20
1 changed files with 1 additions and 1 deletions
|
|
@ -94,7 +94,7 @@ func Tesseract(imgAbsPath string) string {
|
||||||
ret = strings.ReplaceAll(ret, "\t", " ")
|
ret = strings.ReplaceAll(ret, "\t", " ")
|
||||||
reg := regexp.MustCompile("\\s{2,}")
|
reg := regexp.MustCompile("\\s{2,}")
|
||||||
ret = reg.ReplaceAllString(ret, " ")
|
ret = reg.ReplaceAllString(ret, " ")
|
||||||
logging.LogInfof("tesseract [path=%s, size=%d, text=%s, elapsed=%dms]", imgAbsPath, info.Size(), ret, time.Since(now).Milliseconds())
|
//logging.LogInfof("tesseract [path=%s, size=%d, text=%s, elapsed=%dms]", imgAbsPath, info.Size(), ret, time.Since(now).Milliseconds())
|
||||||
msg := fmt.Sprintf("OCR [%s] [%s]", info.Name(), ret)
|
msg := fmt.Sprintf("OCR [%s] [%s]", info.Name(), ret)
|
||||||
PushStatusBar(msg)
|
PushStatusBar(msg)
|
||||||
return ret
|
return ret
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue