summaryrefslogtreecommitdiff
path: root/cmd/pdfbook
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/pdfbook')
-rw-r--r--cmd/pdfbook/main.go12
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()