From 23a7a0d537871427f8fe0bccc8074b3936d52d9b Mon Sep 17 00:00:00 2001 From: Martin Czygan Date: Fri, 10 Sep 2021 00:18:17 +0200 Subject: tasks: sort output --- python/refcat/techreport.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/refcat/techreport.py b/python/refcat/techreport.py index 2e2001d..4223d18 100644 --- a/python/refcat/techreport.py +++ b/python/refcat/techreport.py @@ -20,6 +20,7 @@ class COCIDOIOnly(Refcat): tail -n +2 | cut -d , -f2,3 | perl -F, -lane 'printf qq[%s\n], join ",", sort @F' | + LC_ALL=C sort -S25% | zstd -c -T0 > {output} """, input=self.input().path) @@ -42,9 +43,14 @@ class BrefDOIOnly(Refcat): parallel --pipe -j 24 --block 10M "jq -R -rc 'fromjson? | [.source_doi, .target_doi] | @tsv'" | tr $'\t' ',' | perl -F, -lane 'printf qq[%s\n], join ",", sort @F' | + LC_ALL=C sort -S25% | zstd -c -T0 > {output} """, input=self.input().path) + luigi.LocalTarget(output).move(self.output().path) def output(self): return luigi.LocalTarget(path=self.path(ext="tsv.zst"), format=Zstd) + + +# TODO: Mag DOI -- cgit v1.2.3