diff options
-rw-r--r-- | python/refcat/tasks.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index b0fc041..04ea55d 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -1448,3 +1448,23 @@ class BiblioRefWikiDOISortedKeys(Refcat): def output(self): return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) + +class BiblioRefWiki(Refcat): + + def requires(self): + return { + "wiki": BiblioRefWikiDOISortedKeys(), + "releases": FatcatDOI(), + } + + def run(self): + output = shellout(r""" + skate-verify -m wiki -r doi -R <(zstdcat -T0 {releases}) -W <(zstdcat -T0 {wiki}) | + zstd -c -T0 > {output} + """, + releases=self.input().get("releases").path, + refs=self.input().get("wiki").path) + luigi.LocalTarget(output).move(self.output().path) + + def output(self): + return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd) |