aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-03-30 03:11:52 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-03-30 03:11:52 +0200
commit98f18b3a1044eed995a26019dc14a37ace5aa9be (patch)
treec349f213f2710a07de09975ddba00b51d5bcb826 /python
parent2ba04744b80122f3b1a7e01130a5d9cea53462fb (diff)
downloadrefcat-98f18b3a1044eed995a26019dc14a37ace5aa9be.tar.gz
refcat-98f18b3a1044eed995a26019dc14a37ace5aa9be.zip
example task
Diffstat (limited to 'python')
-rw-r--r--python/refcat/tasks.py14
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)