aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/refcat/tasks.py16
-rw-r--r--python/refcat/utils.py1
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: