summaryrefslogtreecommitdiff
path: root/cmd/rescribe/main.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2021-06-29 12:38:44 +0100
committerNick White <git@njw.name>2021-06-29 12:38:44 +0100
commita798db15135d56205bbe3660741b53837094914b (patch)
tree161cd7ee0a0ee13e03971c2983c9e49beac3d505 /cmd/rescribe/main.go
parentb729f98ac46e3a004eb59732705506bda22a7a03 (diff)
rescribe: Add embed target for darwin (osx) too
Diffstat (limited to 'cmd/rescribe/main.go')
-rw-r--r--cmd/rescribe/main.go8
1 files changed, 5 insertions, 3 deletions
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)
}