diff options
-rw-r--r-- | skate/cmd/skate-reduce/main.go | 16 | ||||
-rw-r--r-- | skate/zippy.go | 6 |
2 files changed, 18 insertions, 4 deletions
diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go index 8915ec6..9c87a35 100644 --- a/skate/cmd/skate-reduce/main.go +++ b/skate/cmd/skate-reduce/main.go @@ -63,10 +63,12 @@ var ( logFile = flag.String("log", "", "log filename") // Possible inputs -- we could switch to a subcommand cli parser? - refs = flag.String("F", "", "path to refs input") - releases = flag.String("L", "", "path to release input") - wiki = flag.String("W", "", "path to wiki input") - openLibrary = flag.String("O", "", "path to open library input") + refs = flag.String("F", "", "path to refs input") + releases = flag.String("L", "", "path to release input") + wiki = flag.String("W", "", "path to wiki input") + openLibrary = flag.String("O", "", "path to open library input") // XXX: Too generic name. + openLibraryEditions = flag.String("O", "", "path to open library input editions, keyed on work id") + openLibraryWorks = flag.String("O", "", "path to open library input works, keyed on work id") // Extra args. reason = flag.String("r", "", "reason for match: doi, pmid, pmcid, arxiv, unknown") @@ -142,9 +144,15 @@ func main() { if err != nil { log.Fatal(err) } + // XXX: This is broken. if err := skate.ZippyRefsOpenLibrary(o, f, bw); err != nil { log.Fatal(err) } + case "olmerge": + e, w, err := xio.OpenTwo(*openLibraryEditions, *openLibraryWorks) + if err != nil { + log.Fatal(err) + } default: log.Fatalf("invalid mode") } diff --git a/skate/zippy.go b/skate/zippy.go index 194b8ba..1da280c 100644 --- a/skate/zippy.go +++ b/skate/zippy.go @@ -206,6 +206,12 @@ func ZippyRefsOpenLibrary(olr, refs io.Reader, w io.Writer) error { return zipper.Run() } +func ZippyOpenLibraryMerge(ole, olw io.Reader, w io.Writer) error { + // XXX: augment on or the other schema with subtitles; maybe generate + // release schema right away. + return nil +} + // makeKeyFunc creates a function that can be used as keyFunc, selecting a // column from fields separated by sep; column is 1-indexed. func makeKeyFunc(sep string, column int) func(string) (string, error) { |