aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-07-09 18:18:08 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-07-09 18:18:08 +0200
commitf174e2ef23c66180cbdef1b04e2fbb04e85f27d3 (patch)
treead6842205ad9c17458eb4aa9e47dfa8055577ba6 /python
parent5962c0eb9d3f6b870af65873322dadfcc4eb50e8 (diff)
downloadrefcat-f174e2ef23c66180cbdef1b04e2fbb04e85f27d3.tar.gz
refcat-f174e2ef23c66180cbdef1b04e2fbb04e85f27d3.zip
tasks: wiki stub
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: