diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-09-10 00:18:17 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-09-10 00:18:17 +0200 |
commit | 23a7a0d537871427f8fe0bccc8074b3936d52d9b (patch) | |
tree | 4f93de980acfadce013af3ec229e212a1c5c1fde | |
parent | eafa1ab9d00111ec6e2fba2c34bef33556bf2169 (diff) | |
download | refcat-23a7a0d537871427f8fe0bccc8074b3936d52d9b.tar.gz refcat-23a7a0d537871427f8fe0bccc8074b3936d52d9b.zip |
tasks: sort output
-rw-r--r-- | python/refcat/techreport.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 |