This commit is contained in:
Liang Ding 2023-01-26 23:30:29 +08:00
parent 78ed38a33a
commit df9122b664
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
16 changed files with 175 additions and 197 deletions

View file

@ -19,15 +19,12 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func AutoOCRAssets() {
func OCRAssetsJob() {
if !util.TesseractEnabled {
return
}
for {
task.AppendTask(task.OCRImage, autoOCRAssets)
time.Sleep(7 * time.Second)
}
task.AppendTask(task.OCRImage, autoOCRAssets)
}
func autoOCRAssets() {
@ -111,11 +108,8 @@ func getUnOCRAssetsAbsPaths() (ret []string) {
return
}
func AutoFlushAssetsTexts() {
for {
SaveAssetsTexts()
time.Sleep(7 * time.Second)
}
func FlushAssetsTextsJob() {
SaveAssetsTexts()
}
func LoadAssetsTexts() {