summaryrefslogtreecommitdiff
path: root/cmd/booktopipeline
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-12-11 15:01:17 +0000
committerNick White <git@njw.name>2019-12-11 15:01:17 +0000
commit23c1b47eb42ef8de6f5d5dd8e4afb80e8bd17497 (patch)
tree3e3f99b74d5db373a989265b3be5092f3b292726 /cmd/booktopipeline
parentca1ee4ccb33784103339b4b52f8948aa0dd30263 (diff)
Add ability to set a different training for the ocr job
Diffstat (limited to 'cmd/booktopipeline')
-rw-r--r--cmd/booktopipeline/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/booktopipeline/main.go b/cmd/booktopipeline/main.go
index 264b6ab..425c41f 100644
--- a/cmd/booktopipeline/main.go
+++ b/cmd/booktopipeline/main.go
@@ -10,7 +10,7 @@ import (
"rescribe.xyz/bookpipeline"
)
-const usage = `Usage: booktopipeline [-prebinarised] [-v] bookdir [bookname]
+const usage = `Usage: booktopipeline [-t training] [-prebinarised] [-v] bookdir [bookname]
Uploads the book in bookdir to the S3 'inprogress' bucket and adds it
to the 'preprocess' SQS queue, or the 'wipeonly' queue if the
@@ -52,6 +52,7 @@ func (f fileWalk) Walk(path string, info os.FileInfo, err error) error {
func main() {
verbose := flag.Bool("v", false, "Verbose")
wipeonly := flag.Bool("prebinarised", false, "Prebinarised: only preprocessing will be to wipe")
+ training := flag.String("t", "", "Training file to use")
flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), usage)
@@ -111,6 +112,9 @@ func main() {
}
}
+ if *training != "" {
+ bookname = bookname + " " + *training
+ }
err = conn.AddToQueue(qid, bookname)
if err != nil {
log.Fatalln("Error adding book to queue:", err)