summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/rescribe/embed_darwin.go2
-rw-r--r--cmd/rescribe/getembeds.go1
-rw-r--r--cmd/rescribe/main.go8
3 files changed, 7 insertions, 4 deletions
diff --git a/cmd/rescribe/embed_darwin.go b/cmd/rescribe/embed_darwin.go
index cad8a29..719c9cc 100644
--- a/cmd/rescribe/embed_darwin.go
+++ b/cmd/rescribe/embed_darwin.go
@@ -6,5 +6,5 @@ package main
import _ "embed"
-// TODO: add go:embed here
+//go:embed tesseract-osx-v4.1.1.20191227.zip
var tesszip []byte
diff --git a/cmd/rescribe/getembeds.go b/cmd/rescribe/getembeds.go
index e59e888..a3edaf2 100644
--- a/cmd/rescribe/getembeds.go
+++ b/cmd/rescribe/getembeds.go
@@ -43,6 +43,7 @@ func main() {
urls := []string {
"https://rescribe.xyz/rescribe/embeds/tessdata.20210622.zip",
"https://rescribe.xyz/rescribe/embeds/tesseract-linux-v5.0.0-alpha.20210510.zip",
+ "https://rescribe.xyz/rescribe/embeds/tesseract-osx-v4.1.1.20191227.zip",
"https://rescribe.xyz/rescribe/embeds/tesseract-w32-v5.0.0-alpha.20210506.zip",
}
for _, v := range urls {
diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go
index eb9719f..814504b 100644
--- a/cmd/rescribe/main.go
+++ b/cmd/rescribe/main.go
@@ -191,11 +191,12 @@ These training files are included in rescribe, and are always available:
log.Fatalln("Error unpacking embedded Tesseract zip:", err)
}
switch runtime.GOOS {
- case "windows":
- tessCommand = filepath.Join(tessdir, "tesseract.exe")
+ case "darwin":
+ tessCommand = filepath.Join(tessdir, "tesseract")
case "linux":
tessCommand = filepath.Join(tessdir, "tesseract")
- // TODO: add osx
+ case "windows":
+ tessCommand = filepath.Join(tessdir, "tesseract.exe")
}
}
@@ -241,6 +242,7 @@ These training files are included in rescribe, and are always available:
fmt.Fprintf(os.Stderr, "Ensure that Tesseract is installed and available, or don't use the -systess flag.\n")
fmt.Fprintf(os.Stderr, "You may need to -tesscmd to the full path of Tesseract.exe if you're on Windows, like this:\n")
fmt.Fprintf(os.Stderr, " rescribe -tesscmd 'C:\\Program Files\\Tesseract OCR (x86)\\tesseract.exe' ...\n")
+ fmt.Fprintf(os.Stderr, "Error message: %v\n", err)
os.Exit(1)
}