aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-22 00:40:36 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-22 00:40:36 +0200
commit131595eb60457115dbe9d3bc7c9dedb4253a17ed (patch)
tree3c9fade2168e36afac265895058d8e0d5d5fb46c /skate/cmd
parentd0413165c6259d8c69f04948ceb649eb40910d0b (diff)
downloadrefcat-131595eb60457115dbe9d3bc7c9dedb4253a17ed.tar.gz
refcat-131595eb60457115dbe9d3bc7c9dedb4253a17ed.zip
wip: ol fuzzy matching
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-reduce/main.go20
1 files changed, 17 insertions, 3 deletions
diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go
index ca87994..19e5fb5 100644
--- a/skate/cmd/skate-reduce/main.go
+++ b/skate/cmd/skate-reduce/main.go
@@ -34,6 +34,11 @@
// * wiki | zippy mode for releases and wikipedia inputs.
// |
// | $ skate-reduce -m wiki -L a.ndj -W b.ndj
+// |
+// |
+// * ol | zippy mode for releases and OL inputs.
+// |
+// | $ skate-reduce -m ol -F a.ndj -O b.ndj
//
package main
@@ -58,9 +63,10 @@ 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")
+ 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")
// Extra args.
reason = flag.String("r", "", "reason for match: doi, pmid, pmcid, arxiv, unknown")
@@ -131,6 +137,14 @@ func main() {
if err := skate.ZippyExactWiki(l, w, reasonMap["doi"], bw); err != nil {
log.Fatal(err)
}
+ case "ol":
+ o, f, err := xio.OpenTwo(*openLibrary, *refs)
+ if err != nil {
+ log.Fatal(err)
+ }
+ if err := skate.ZippyRefsOpenLibrary(o, f, bw); err != nil {
+ log.Fatal(err)
+ }
default:
log.Fatalf("invalid mode")
}