summaryrefslogtreecommitdiff
path: root/cmd/rescribe
diff options
context:
space:
mode:
authorNick White <git@njw.name>2022-03-21 14:27:01 +0000
committerNick White <git@njw.name>2022-03-21 14:27:01 +0000
commitbbc29f09b91495dca619abf3c77b86fb92371b20 (patch)
treef550a0fcc74cf0753b4f2ae83d61ee4d10855d0f /cmd/rescribe
parent76d91ea8f65c6ad52efb24ac2c94b22c2908bc5c (diff)
rescribe: Improve cli wording and simplify PDF stuff slightly
Diffstat (limited to 'cmd/rescribe')
-rw-r--r--cmd/rescribe/main.go7
1 files changed, 2 insertions, 5 deletions
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)