aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/refcat/tasks.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py
index c721486..2d31068 100644
--- a/python/refcat/tasks.py
+++ b/python/refcat/tasks.py
@@ -1521,3 +1521,23 @@ class CDXURL(Refcat):
def output(self):
return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd)
+
+
+class BrefZipWayback(Refcat):
+ def requires(self):
+ return {
+ "refs": RefsURL(),
+ "cdx": CDXURL(),
+ }
+
+ def run(self):
+ output = shellout("""
+ skate-reduce -m wb -F <(zstdcat -T0 {refs}) -C <(zstdcat -T0 {cdx}) | zstd -c -T0 > {output}
+ """,
+ refs=self.input().get("refs").path,
+ cdx=self.input().get("cdx").path)
+
+ luigi.LocalTarget(output).move(self.output().path)
+
+ def output(self):
+ return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd)