From bbc29f09b91495dca619abf3c77b86fb92371b20 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 21 Mar 2022 14:27:01 +0000 Subject: rescribe: Improve cli wording and simplify PDF stuff slightly --- cmd/rescribe/main.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'cmd') diff --git a/cmd/rescribe/main.go b/cmd/rescribe/main.go index eba8e84..53bbe3c 100644 --- a/cmd/rescribe/main.go +++ b/cmd/rescribe/main.go @@ -157,7 +157,7 @@ These training files are included in rescribe, and are always available: `) tesscmd := flag.String("tesscmd", deftesscmd, "The Tesseract executable to run. You may need to set this to the full path of Tesseract.exe if you're on Windows.") wipe := flag.Bool("wipe", false, "Use wiper tool to remove noise like gutters from page before processing.") - fullpdf := flag.Bool("fullpdf", false, "Create a full-size searchable PDF (rather than a reduced size one).") + fullpdf := flag.Bool("fullpdf", false, "Use highest image quality for searchable PDF (requires lots of RAM).") flag.Usage = func() { fmt.Fprintf(flag.CommandLine.Output(), usage) @@ -548,12 +548,9 @@ func startProcess(ctx context.Context, logger log.Logger, tessCommand string, bo fullsizepath := filepath.Join(savedir, bookname+".original.pdf") pdfpath := filepath.Join(savedir, bookname+" searchable.pdf") - // If full size pdf is requested, replace colour.pdf with it, - // otherwise just remove it + // If full size pdf is requested, replace colour.pdf with it if fullpdf { _ = os.Rename(fullsizepath, colourpath) - } else { - _ = os.Remove(fullsizepath) } _, err = os.Stat(binpath) -- cgit v1.2.1-24-ge1ad