🎨 Tesseract OCR 使用用户安装的语言包 Fix https://github.com/siyuan-note/siyuan/issues/7157

This commit is contained in:
Liang Ding 2023-01-24 20:02:55 +08:00
parent a99ca6d62f
commit 4d18229320
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -123,23 +123,6 @@ func initTesseract() {
}
}
logging.LogInfof("tesseract-ocr enabled [ver=%s, langs=%s]", ver, strings.Join(TesseractLangs, "+"))
if !gulu.Str.Contains("eng", TesseractLangs) {
logging.LogWarnf("no eng tesseract lang found")
return
}
foundChi := false
for _, lang := range TesseractLangs {
if strings.Contains(lang, "chi") {
foundChi = true
break
}
}
if !foundChi {
logging.LogWarnf("no chi_* tesseract lang found")
return
}
}
func getTesseractVer() (ret string) {