summaryrefslogtreecommitdiff
path: root/cmd/rescribe
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/rescribe')
-rw-r--r--cmd/rescribe/gui.go2
-rw-r--r--cmd/rescribe/main.go8
2 files changed, 5 insertions, 5 deletions
diff --git a/cmd/rescribe/gui.go b/cmd/rescribe/gui.go
index f03d66e..ef58fce 100644
--- a/cmd/rescribe/gui.go
+++ b/cmd/rescribe/gui.go
@@ -219,7 +219,7 @@ func formatProgressBarText(bar *widget.ProgressBar) func() string {
}
// startGui starts the gui process
-func startGui(log log.Logger, cmd string, gbookcmd string, training string, tessdir string) error {
+func startGui(log *log.Logger, cmd string, gbookcmd string, training string, tessdir string) error {
myApp := app.New()
myWindow := myApp.NewWindow("Rescribe OCR")
diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go
index c9118a8..74f6440 100644
--- a/cmd/rescribe/main.go
+++ b/cmd/rescribe/main.go
@@ -259,7 +259,7 @@ These training files are included in rescribe, and are always available:
}
if flag.NArg() < 1 || *usegui {
- err := startGui(*verboselog, tessCommand, gbookCommand, trainingName, tessdir)
+ err := startGui(verboselog, tessCommand, gbookCommand, trainingName, tessdir)
err = os.RemoveAll(tessdir)
if err != nil {
log.Printf("Error removing tesseract directory %s: %v", tessdir, err)
@@ -319,7 +319,7 @@ These training files are included in rescribe, and are always available:
ispdf = true
}
- err = startProcess(ctx, *verboselog, tessCommand, bookdir, bookname, trainingName, savedir, tessdir, !*wipe, *fullpdf)
+ err = startProcess(ctx, verboselog, tessCommand, bookdir, bookname, trainingName, savedir, tessdir, !*wipe, *fullpdf)
if err != nil {
log.Fatalln(err)
}
@@ -459,7 +459,7 @@ func rmIfNotImage(f string) error {
return nil
}
-func startProcess(ctx context.Context, logger log.Logger, tessCommand string, bookdir string, bookname string, trainingName string, savedir string, tessdir string, nowipe bool, fullpdf bool) error {
+func startProcess(ctx context.Context, logger *log.Logger, tessCommand string, bookdir string, bookname string, trainingName string, savedir string, tessdir string, nowipe bool, fullpdf bool) error {
cmd := exec.Command(tessCommand, "--help")
pipeline.HideCmd(cmd)
_, err := cmd.Output()
@@ -478,7 +478,7 @@ func startProcess(ctx context.Context, logger log.Logger, tessCommand string, bo
}
var conn Pipeliner
- conn = &bookpipeline.LocalConn{Logger: &logger, TempDir: tempdir}
+ conn = &bookpipeline.LocalConn{Logger: logger, TempDir: tempdir}
conn.Log("Setting up session")
err = conn.Init()