mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Tesseract OCR 使用用户安装的语言包 Fix https://github.com/siyuan-note/siyuan/issues/7157
This commit is contained in:
parent
a99ca6d62f
commit
4d18229320
1 changed files with 0 additions and 17 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue