diff options
Diffstat (limited to 'python')
-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 6fefc6a..3dcdd65 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -415,6 +415,26 @@ class RefsArxiv(Refcat): return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) +class RefsToRelease(Refcat): + """ + Convert refs to release. + """ + def requires(self): + return RefsWithUnstructured() + + def run(self): + output = shellout(""" + zstdcat -T0 {input} | + skate-conv -f ref -w 24 -b 100000 | + zstd -T0 -c > {output} + """, + input=self.input().path) + luigi.LocalTarget(output).move(self.output().path) + + def output(self): + return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) + + class FatcatDOI(Refcat): """ DOI from fatcat. |