diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-07-15 18:45:13 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-07-15 18:45:13 +0200 |
commit | bf2c526fab3b9baac53f279adf3081e2092d9565 (patch) | |
tree | 4dcc5e35cd6b3ca822f69c7d0f0c0430993b9032 /skate | |
parent | d55dbd5b9ef8a1c4963d73e33bf76313175fcc30 (diff) | |
download | refcat-bf2c526fab3b9baac53f279adf3081e2092d9565.tar.gz refcat-bf2c526fab3b9baac53f279adf3081e2092d9565.zip |
register reducer
Diffstat (limited to 'skate')
-rw-r--r-- | skate/cmd/skate-reduce/main.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go index 0d91518..b607be5 100644 --- a/skate/cmd/skate-reduce/main.go +++ b/skate/cmd/skate-reduce/main.go @@ -54,6 +54,11 @@ // * unmatched | join matched and unmatched reference data; do deduplicate on the fly // | // | $ skate-reduce -m unmatched -B a.ndj -F b.ndj +// | +// | +// * wb | join raw refs with urls with ad-hoc wayback json schema noting last timestamp +// | +// | $ skate-reduce -m wb -F a.ndj -C b.ndj // package main @@ -85,6 +90,7 @@ var ( 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. + cdxAdhoc = flag.String("C", "", "cdx adhoc schema") // Extra args. reason = flag.String("r", "", "reason for match: doi, pmid, pmcid, arxiv, unknown") @@ -205,6 +211,14 @@ func main() { if err := skate.ZippyBrefAugment(b, f, bw); err != nil { log.Fatal(err) } + case "wb": + f, c, err := xio.OpenTwo(*refs, *cdxAdhoc) + if err != nil { + log.Fatal(err) + } + if err := skate.ZippyBrefAugment(f, c, bw); err != nil { + log.Fatal(err) + } default: log.Fatalf("invalid mode") } |