From f174e2ef23c66180cbdef1b04e2fbb04e85f27d3 Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Fri, 9 Jul 2021 18:18:08 +0200 Subject: tasks: wiki stub --- python/refcat/tasks.py | 16 ++++++++++++++++ python/refcat/utils.py | 1 + 2 files changed, 17 insertions(+) (limited to 'python') 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: -- cgit v1.2.3