mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Re OCR popup prompt when Tesseract is not enabled https://github.com/siyuan-note/siyuan/issues/15367
This commit is contained in:
parent
7787ac6e1d
commit
70741fffcc
15 changed files with 40 additions and 15 deletions
|
|
@ -149,7 +149,12 @@ func ExistsAssetText(asset string) (ret bool) {
|
|||
return
|
||||
}
|
||||
|
||||
func OcrAsset(asset string) (ret []map[string]interface{}) {
|
||||
func OcrAsset(asset string) (ret []map[string]interface{}, err error) {
|
||||
if !TesseractEnabled {
|
||||
err = fmt.Errorf(Langs[Lang][266])
|
||||
return
|
||||
}
|
||||
|
||||
assetsPath := GetDataAssetsAbsPath()
|
||||
assetAbsPath := strings.TrimPrefix(asset, "assets")
|
||||
assetAbsPath = filepath.Join(assetsPath, assetAbsPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue