aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-biblioref-from-wikipedia/main.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/skate/cmd/skate-biblioref-from-wikipedia/main.go b/skate/cmd/skate-biblioref-from-wikipedia/main.go
index 61b590e..86fba1a 100644
--- a/skate/cmd/skate-biblioref-from-wikipedia/main.go
+++ b/skate/cmd/skate-biblioref-from-wikipedia/main.go
@@ -2,6 +2,7 @@ package main
import (
"flag"
+ "fmt"
"log"
"os"
"runtime"
@@ -25,12 +26,13 @@ func main() {
if err := json.Unmarshal(p, &w); err != nil {
return nil, err
}
- b, err := json.Marshal(w.ParseIDList())
- if err != nil {
- return nil, err
+ idl := w.ParseIDList()
+ if idl.DOI == "" {
+ return nil, nil
}
- b = append(b, bytesNewline...)
- return b, nil
+ s := fmt.Sprintf("%s\t%s\n", idl.DOI, string(p))
+ return []byte(s), nil
+
})
pp.NumWorkers = *numWorkers
pp.BatchSize = *batchSize