diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-03-30 03:11:52 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-03-30 03:15:25 +0200 |
commit | cdd223181639653c5d79d4e08f6307412df2fc61 (patch) | |
tree | c349f213f2710a07de09975ddba00b51d5bcb826 /python | |
parent | 2ba04744b80122f3b1a7e01130a5d9cea53462fb (diff) | |
download | refcat-cdd223181639653c5d79d4e08f6307412df2fc61.tar.gz refcat-cdd223181639653c5d79d4e08f6307412df2fc61.zip |
example task
Diffstat (limited to 'python')
-rw-r--r-- | python/refcat/tasks.py | 14 |
1 files changed, 12 insertions, 2 deletions
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) |