diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-07-09 18:18:08 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-07-09 18:18:08 +0200 |
commit | f174e2ef23c66180cbdef1b04e2fbb04e85f27d3 (patch) | |
tree | ad6842205ad9c17458eb4aa9e47dfa8055577ba6 | |
parent | 5962c0eb9d3f6b870af65873322dadfcc4eb50e8 (diff) | |
download | refcat-f174e2ef23c66180cbdef1b04e2fbb04e85f27d3.tar.gz refcat-f174e2ef23c66180cbdef1b04e2fbb04e85f27d3.zip |
tasks: wiki stub
-rw-r--r-- | python/refcat/tasks.py | 16 | ||||
-rw-r--r-- | python/refcat/utils.py | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index 58e0e38..ce89ace 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -1407,8 +1407,10 @@ class UnmatchedResolveJournalNamesMapped(Refcat): def output(self): return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) + # Wikipedia related tasks + class WikipediaDOI(Refcat): """ Sorted DOI keys from wikipedia. Takes about a minute. @@ -1428,3 +1430,17 @@ class WikipediaDOI(Refcat): def output(self): return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) + + +class BrefZipWikiDOI(Refcat): + def requires(self): + return { + "wiki": WikipediaDOI(), + "fatcat": FatcatDOI(), + } + + def run(self): + raise NotImplementedError() + + def output(self): + return luigi.LocalTarget(path=self.path(ext="json.zst"), format=Zstd) diff --git a/python/refcat/utils.py b/python/refcat/utils.py index a665a25..30f3593 100644 --- a/python/refcat/utils.py +++ b/python/refcat/utils.py @@ -4,6 +4,7 @@ Assorted utilities. import io + def columnize(lines, term_width=80, indent=0, pad=2): n_lines = len(lines) if n_lines == 0: |