From e71d07f11630d6205a85f11db9fd548a61a9a5b1 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Sat, 22 May 2021 13:36:23 +0200 Subject: wip: ol merge --- skate/cmd/skate-reduce/main.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'skate/cmd') 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") } -- cgit v1.2.3