From 98f18b3a1044eed995a26019dc14a37ace5aa9be Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Tue, 30 Mar 2021 03:11:52 +0200 Subject: example task --- python/refcat/tasks.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index df56b9d..fbed8ca 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -1429,10 +1429,20 @@ class MAGDOI(Refcat): # ==== WikipediaCitations -class BiblioRefWikipediaCitations(Refcat): +class BiblioRefWikiDOISortedKeys(Refcat): """ - Generate a biblioref schema from wikipedia citations minimal file. + Sorted DOI keys from wikipedia. """ def requires(self): return WikipediaCitationsMinimalDataset() + + def run(self): + output = shellout("cat {input} | + skate-biblioref-from-wikipedia | + LC_ALL=C sort -s 10% -k2,2 | + zstd -T0 -c > {output} + """, input=self.input().path) + + def output(self): + return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) -- cgit v1.2.3