From b37a447ae1620c8578d4fd9f221087b265d86cfe Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Sat, 29 May 2021 02:23:38 +0200 Subject: reduce: use 'oled' name --- skate/cmd/skate-reduce/main.go | 9 ++++----- skate/zippy.go | 8 +++++--- 2 files changed, 9 insertions(+), 8 deletions(-) (limited to 'skate') diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go index 74053ef..fe8b803 100644 --- a/skate/cmd/skate-reduce/main.go +++ b/skate/cmd/skate-reduce/main.go @@ -36,9 +36,9 @@ // | $ skate-reduce -m wiki -L a.ndj -W b.ndj // | // | -// * ol | zippy mode for releases and OL inputs. +// * oled | zippy mode for releases and OL inputs. // | -// | $ skate-reduce -m ol -F a.ndj -O b.ndj +// | $ skate-reduce -m oled -F a.ndj -O b.ndj // package main @@ -137,13 +137,12 @@ func main() { if err := skate.ZippyExactWiki(l, w, reasonMap["doi"], bw); err != nil { log.Fatal(err) } - case "ol": + case "oled": o, f, err := xio.OpenTwo(*openLibrary, *refs) if err != nil { log.Fatal(err) } - // XXX: This is broken. - if err := skate.ZippyVerifyRefsOpenLibrary(o, f, bw); err != nil { + if err := skate.ZippyVerifyRefsOpenLibraryTable(o, f, bw); err != nil { log.Fatal(err) } default: diff --git a/skate/zippy.go b/skate/zippy.go index 43fc911..36faeda 100644 --- a/skate/zippy.go +++ b/skate/zippy.go @@ -159,9 +159,9 @@ func ZippyVerifyRefs(releases, refs io.Reader, w io.Writer) error { return zipper.Run() } -// ZippyVerifyRefsOpenLibrary takes OL editions (as release) and refs (as +// ZippyVerifyRefsOpenLibraryTable takes OL editions (as release) and refs (as // release) and emits biblioref. -func ZippyVerifyRefsOpenLibrary(olr, refs io.Reader, w io.Writer) error { +func ZippyVerifyRefsOpenLibraryTable(olr, refs io.Reader, w io.Writer) error { // Define a grouper, working on one set of refs and releases with the same // key at a time. var ( @@ -186,9 +186,11 @@ func ZippyVerifyRefsOpenLibrary(olr, refs io.Reader, w io.Writer) error { // compare against titles from open library. re.Title = re.ContainerName result := Verify(pivot, re) - fmt.Printf("%s\t%s\t%s\t%s\t%s\n", + fmt.Printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\n", result.Status.Short(), result.Reason.Short(), + pivot.Ident, + re.Ident, CutSep(g.G0[0], "\t", 1), pivot.Title, re.Title) -- cgit v1.2.3