summaryrefslogtreecommitdiff
path: root/cmd/confgraph/main.go
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-10-09 20:51:43 +0100
committerNick White <git@njw.name>2019-10-09 20:51:43 +0100
commit7807cae93dadf4772828d465b0a367095e4dcd46 (patch)
tree5a39312781cd32ad272e4e792d33c48da9806f19 /cmd/confgraph/main.go
parent8908fc011f83aee2a958d798648d08a0d04fa55b (diff)
Make confgraph and graph in general more resilient to bad input
Diffstat (limited to 'cmd/confgraph/main.go')
-rw-r--r--cmd/confgraph/main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/confgraph/main.go b/cmd/confgraph/main.go
index 9b158f3..ed5ce93 100644
--- a/cmd/confgraph/main.go
+++ b/cmd/confgraph/main.go
@@ -22,6 +22,9 @@ func walker(confs *[]*bookpipeline.Conf) filepath.WalkFunc {
}
avg, err := hocr.GetAvgConf(path)
if err != nil {
+ if err.Error() == "No words found" {
+ return nil
+ }
return err
}
c := bookpipeline.Conf{
@@ -35,7 +38,7 @@ func walker(confs *[]*bookpipeline.Conf) filepath.WalkFunc {
func main() {
flag.Usage = func() {
- fmt.Fprintln(flag.CommandLine.Output(), "Usage: bookpipeline hocrdir graph.png")
+ fmt.Fprintln(flag.CommandLine.Output(), "Usage: confgraph hocrdir graph.png")
flag.PrintDefaults()
}
flag.Parse()