aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-07-15 18:45:13 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-07-15 18:45:13 +0200
commitbf2c526fab3b9baac53f279adf3081e2092d9565 (patch)
tree4dcc5e35cd6b3ca822f69c7d0f0c0430993b9032
parentd55dbd5b9ef8a1c4963d73e33bf76313175fcc30 (diff)
downloadrefcat-bf2c526fab3b9baac53f279adf3081e2092d9565.tar.gz
refcat-bf2c526fab3b9baac53f279adf3081e2092d9565.zip
register reducer
-rw-r--r--skate/cmd/skate-reduce/main.go14
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")
}