aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-05-15 00:42:28 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-05-15 00:42:28 +0200
commit14c9274513b6949fb32d7373c43530c6b15c8e85 (patch)
tree99fdcdb1fa5b49625e00033a1aacda3ab81689ae
parentc4a96a00ffb5bcdee35ee36967e4da836ca58ed1 (diff)
downloadrefcat-14c9274513b6949fb32d7373c43530c6b15c8e85.tar.gz
refcat-14c9274513b6949fb32d7373c43530c6b15c8e85.zip
add -q flag
-rw-r--r--python/notes/version_3.md8
-rw-r--r--skate/cmd/skate-reduce/main.go7
2 files changed, 13 insertions, 2 deletions
diff --git a/python/notes/version_3.md b/python/notes/version_3.md
index c2cdc60..f828ee8 100644
--- a/python/notes/version_3.md
+++ b/python/notes/version_3.md
@@ -308,3 +308,11 @@ So maybe 500k isbn in total?
* about 25M urls
* about 11075871 seem to have a "doi"
+
+----
+
+A subtle bug: a doi in refs ends with tab:
+
+```
+10.1002/andp.19975090102\t
+```
diff --git a/skate/cmd/skate-reduce/main.go b/skate/cmd/skate-reduce/main.go
index 959dd87..6c69121 100644
--- a/skate/cmd/skate-reduce/main.go
+++ b/skate/cmd/skate-reduce/main.go
@@ -40,6 +40,7 @@ package main
import (
"bufio"
"flag"
+ "io/ioutil"
"log"
"os"
"runtime"
@@ -53,6 +54,7 @@ var (
numWorkers = flag.Int("w", runtime.NumCPU(), "number of workers")
batchSize = flag.Int("b", 10000, "batch size")
mode = flag.String("m", "ref", "mode, e.g. exact, verify, ref, bref, wiki")
+ quite = flag.Bool("q", false, "be quite")
// Possible inputs -- we could switch to a subcommand cli parser?
refs = flag.String("F", "", "path to refs input")
@@ -72,10 +74,11 @@ var (
func main() {
flag.Parse()
-
+ if *quite {
+ log.SetOutput(ioutil.Discard)
+ }
bw := bufio.NewWriter(os.Stdout)
defer bw.Flush()
-
switch *mode {
case "exact":
l, f, err := xio.OpenTwo(*releases, *refs)