From f745a1e3c26690edf26e4b65d1229382beed42d5 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Wed, 4 Aug 2021 01:30:18 +0200 Subject: tasks: add ReleaseIdentDOIMapping --- python/refcat/tasks.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'python') diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index ef5138d..f4aacb1 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -396,6 +396,21 @@ class ReleaseIdentDOIList(Refcat): return luigi.LocalTarget(path=self.path(ext="tsv")) +class ReleaseIdentDOIMapping(Refcat): + """ + Create a mapping database from release ident to DOI. + """ + def requires(self): + return ReleaseIdentDOIList() + + def run(self): + output = shellout("""tabby -C -o {output} {input}""", input=self.input().path) + luigi.LocalTarget(output).move(self.output().path) + + def output(self): + return luigi.LocalTarget(path=self.path(ext="db")) + + class UnmatchedRefs(Refcat): """ File with not yet considered refs (e.g. no title, doi, ...); around -- cgit v1.2.3