diff options
-rw-r--r-- | python/refcat/tasks.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/python/refcat/tasks.py b/python/refcat/tasks.py index b8a942c..0656f3c 100644 --- a/python/refcat/tasks.py +++ b/python/refcat/tasks.py @@ -862,3 +862,27 @@ class UnmatchedMapped(Refcat): def output(self): return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) + + +class UnmatchedOpenLibraryMatchTable(Refcat): + """ + Run matching and write tabular results to file. + """ + def requires(self): + return { + "unmatched": UnmatchedMapped(), + "ol": OpenLibraryEditionsMapped(), + } + + def run(self): + output = shellout(""" + skate-reduce -m oled + -O <(zstdcat -T0 {ol}) + -F <(zstdcat -T0 {unmatched}) | + zstd -c > {output} + """, + ol=self.input().get("ol").path, + unmatched=self.input().get("unmatched").path) + + def output(self): + return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) |