aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-03-30 03:33:42 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-03-30 03:33:42 +0200
commitb6003f250d76050b5f3d9e1ea48b45ab053f9086 (patch)
treee10ff61912f36fbe874515031f9beeb6cf4b1147
parent0f9dfeb25a47681c51d3ea0e8a86b1c5bbb0425f (diff)
downloadrefcat-b6003f250d76050b5f3d9e1ea48b45ab053f9086.tar.gz
refcat-b6003f250d76050b5f3d9e1ea48b45ab053f9086.zip
add BiblioRefWiki
-rw-r--r--python/refcat/tasks.py20
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)