summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/pagegraph/main.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/cmd/pagegraph/main.go b/cmd/pagegraph/main.go
index fb2648f..a52d38c 100644
--- a/cmd/pagegraph/main.go
+++ b/cmd/pagegraph/main.go
@@ -6,36 +6,11 @@ import (
"log"
"os"
"path/filepath"
- "strings"
"rescribe.xyz/bookpipeline"
"rescribe.xyz/utils/pkg/hocr"
)
-func walker(confs *[]*bookpipeline.Conf) filepath.WalkFunc {
- return func(path string, info os.FileInfo, err error) error {
- if info.IsDir() {
- return nil
- }
- if !strings.HasSuffix(path, ".hocr") {
- return nil
- }
- avg, err := hocr.GetAvgConf(path)
- if err != nil {
- if err.Error() == "No words found" {
- return nil
- }
- return err
- }
- c := bookpipeline.Conf{
- Conf: avg,
- Path: path,
- }
- *confs = append(*confs, &c)
- return nil
- }
-}
-
func main() {
flag.Usage = func() {
fmt.Fprintln(flag.CommandLine.Output(), "Usage: pagegraph file.hocr graph.png")