diff options
Diffstat (limited to 'skate/cmd/skate-wikipedia-doi/main.go')
-rw-r--r-- | skate/cmd/skate-wikipedia-doi/main.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/skate/cmd/skate-wikipedia-doi/main.go b/skate/cmd/skate-wikipedia-doi/main.go index be3be0a..fe56576 100644 --- a/skate/cmd/skate-wikipedia-doi/main.go +++ b/skate/cmd/skate-wikipedia-doi/main.go @@ -18,6 +18,7 @@ var ( numWorkers = flag.Int("w", runtime.NumCPU(), "number of workers") batchSize = flag.Int("b", 100000, "batch size") bytesNewline = []byte("\n") + wsReplacer = strings.NewReplacer("\t", "", "\n", "", " ", "") ) func main() { @@ -32,7 +33,7 @@ func main() { return nil, nil } var ( - doi = strings.TrimSpace(ids.DOI) + doi = wsReplacer.Replace(ids.DOI) pageTitle = strings.TrimSpace(w.PageTitle) s = fmt.Sprintf("%s\t%s\t%s", doi, pageTitle, string(p)) ) |