summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/rescribe/embed_linux.go2
-rw-r--r--cmd/rescribe/getembeds.go1
-rw-r--r--cmd/rescribe/main.go12
3 files changed, 9 insertions, 6 deletions
diff --git a/cmd/rescribe/embed_linux.go b/cmd/rescribe/embed_linux.go
index cad8a29..c720b6e 100644
--- a/cmd/rescribe/embed_linux.go
+++ b/cmd/rescribe/embed_linux.go
@@ -6,5 +6,5 @@ package main
import _ "embed"
-// TODO: add go:embed here
+//go:embed tesseract-linux-v5.0.0-alpha.20210510.zip
var tesszip []byte
diff --git a/cmd/rescribe/getembeds.go b/cmd/rescribe/getembeds.go
index b2b5392..e59e888 100644
--- a/cmd/rescribe/getembeds.go
+++ b/cmd/rescribe/getembeds.go
@@ -42,6 +42,7 @@ func dl(url string) error {
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-w32-v5.0.0-alpha.20210506.zip",
}
for _, v := range urls {
diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go
index 56c9777..ea2590f 100644
--- a/cmd/rescribe/main.go
+++ b/cmd/rescribe/main.go
@@ -185,14 +185,16 @@ func main() {
}
if !*systess {
+ err = unpackZip(tesszip, tessdir)
+ if err != nil {
+ log.Fatalln("Error unpacking embedded Tesseract zip:", err)
+ }
switch runtime.GOOS {
case "windows":
- err = unpackZip(tesszip, tessdir)
- if err != nil {
- log.Fatalln("Error unpacking embedded Tesseract zip:", err)
- }
tessCommand = filepath.Join(tessdir, "tesseract.exe")
- // TODO: add linux and osx
+ case "linux":
+ tessCommand = filepath.Join(tessdir, "tesseract")
+ // TODO: add osx
}
}