diff options
author | Nick White <git@njw.name> | 2022-02-28 16:17:35 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2022-02-28 16:17:35 +0000 |
commit | 21d49b546a27de6c53d8fe7d1a68d5a3b5506c93 (patch) | |
tree | 729663de5863c125fad24d37df5147c2569771d1 /cmd/rescribe/gui.go | |
parent | 54aca8994863f5c58bce0224bc943b81c60f5d04 (diff) |
Add PreNoWipe queue, that just does binarisation but no wiping
Diffstat (limited to 'cmd/rescribe/gui.go')
-rw-r--r-- | cmd/rescribe/gui.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/rescribe/gui.go b/cmd/rescribe/gui.go index 8603e08..c67d15a 100644 --- a/cmd/rescribe/gui.go +++ b/cmd/rescribe/gui.go @@ -338,6 +338,8 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess d.Show() }) + wipe := widget.NewCheck("Automatically clean image sides", func(bool) {}) + trainingLabel := widget.NewLabel("Training") trainingOpts := mkTrainingSelect([]string{training}, myWindow) @@ -527,7 +529,7 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess training = training[start:end] } - err = startProcess(ctx, log, cmd, bookdir, bookname, training, savedir, tessdir) + err = startProcess(ctx, log, cmd, bookdir, bookname, training, savedir, tessdir, !wipe.Checked) if err != nil && strings.HasSuffix(err.Error(), "context canceled") { progressBar.SetValue(0.0) return @@ -561,8 +563,8 @@ func startGui(log log.Logger, cmd string, gbookcmd string, training string, tess trainingBits := container.New(layout.NewBorderLayout(nil, nil, trainingLabel, nil), trainingLabel, trainingOpts) - fullContent = container.NewVBox(choices, chosen, trainingBits, gobtn, abortbtn, progressBar, detail) - startContent := container.NewVBox(choices, trainingBits, gobtn, abortbtn, progressBar, detail) + fullContent = container.NewVBox(choices, chosen, trainingBits, wipe, gobtn, abortbtn, progressBar, detail) + startContent := container.NewVBox(choices, trainingBits, wipe, gobtn, abortbtn, progressBar, detail) myWindow.SetContent(startContent) |