diff options
author | Nick White <git@njw.name> | 2019-11-26 17:30:24 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-11-26 17:30:24 +0000 |
commit | 92b8af6c81105323912db2300808b87f623970a1 (patch) | |
tree | 7218bc2e08ba747a7f49e416e890ded6f70e1f3e /cmd/pdfbook/main.go | |
parent | 798455070f30a63641a089b3f619a2fe8101475f (diff) |
Improve usage notice
Diffstat (limited to 'cmd/pdfbook/main.go')
-rw-r--r-- | cmd/pdfbook/main.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cmd/pdfbook/main.go b/cmd/pdfbook/main.go index 56f981d..6532f26 100644 --- a/cmd/pdfbook/main.go +++ b/cmd/pdfbook/main.go @@ -14,6 +14,16 @@ import ( "rescribe.xyz/bookpipeline" ) +const usage = `Usage: pdfbook [-c] [-s] dir out.pdf + +Creates a searchable PDF from a directory of hOCR and image files. + +If a 'best' file exists in the directory, each hOCR listed in it is +used to provide the searchable text for each page. Otherwise pdfbook +just looks for a .hocr with the same file base as the image for the +searchable text. +` + type Pdfer interface { Setup() error AddPage(imgpath, hocrpath string, smaller bool) error @@ -99,7 +109,7 @@ func main() { colour := flag.Bool("c", false, "colour") smaller := flag.Bool("s", false, "smaller") flag.Usage = func() { - fmt.Fprintln(flag.CommandLine.Output(), "Usage: pdfbook [-c] [-s] hocrdir out.pdf") + fmt.Fprintln(flag.CommandLine.Output(), usage) flag.PrintDefaults() } flag.Parse() |