From 45b0c3ed61b1a7b7d18090f483c5d9ff9cddec7b Mon Sep 17 00:00:00 2001 From: Nick White Date: Tue, 13 Jul 2021 11:54:00 +0100 Subject: gofmt --- cmd/rescribe/main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd/rescribe/main.go') diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go index 4404789..db8eb41 100644 --- a/cmd/rescribe/main.go +++ b/cmd/rescribe/main.go @@ -46,6 +46,7 @@ var tessdatazip []byte const QueueTimeoutSecs = 2 * 60 const PauseBetweenChecks = 1 * time.Second const LogSaveTime = 1 * time.Minute + var thresholds = []float64{0.1, 0.2, 0.3} // null writer to enable non-verbose logging to be discarded @@ -322,8 +323,8 @@ These training files are included in rescribe, and are always available: } // For simplicity, remove .binarised.pdf and rename .colour.pdf to .pdf - _ = os.Remove(filepath.Join(savedir, bookname + ".binarised.pdf")) - _ = os.Rename(filepath.Join(savedir, bookname + ".colour.pdf"), filepath.Join(savedir, bookname + ".pdf")) + _ = os.Remove(filepath.Join(savedir, bookname+".binarised.pdf")) + _ = os.Rename(filepath.Join(savedir, bookname+".colour.pdf"), filepath.Join(savedir, bookname+".pdf")) } func addTxtVersion(hocrfn string) error { @@ -342,7 +343,7 @@ func addTxtVersion(hocrfn string) error { for _, v := range thresholds { basefn = strings.TrimSuffix(basefn, fmt.Sprintf("_bin%.1f.hocr", v)) } - fn := filepath.Join(dir, "text", basefn + ".txt") + fn := filepath.Join(dir, "text", basefn+".txt") err = ioutil.WriteFile(fn, []byte(t), 0644) if err != nil { -- cgit v1.2.1-24-ge1ad