diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-08-04 01:30:18 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-08-04 01:30:18 +0200 |
commit | f745a1e3c26690edf26e4b65d1229382beed42d5 (patch) | |
tree | c89bf86d13e3de50ef0ecb2b856f126bc50f17cc /python | |
parent | 7c8d01e9e9afd5845c4334111d064e8b246a0d8f (diff) | |
download | refcat-f745a1e3c26690edf26e4b65d1229382beed42d5.tar.gz refcat-f745a1e3c26690edf26e4b65d1229382beed42d5.zip |
tasks: add ReleaseIdentDOIMapping
Diffstat (limited to 'python')
-rw-r--r-- | python/refcat/tasks.py | 15 |
1 files changed, 15 insertions, 0 deletions
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 |