diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2021-09-08 12:50:12 +0200 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2021-09-08 12:50:12 +0200 |
commit | aada9aab955ff5dabb7461795218e0b345bb58d8 (patch) | |
tree | 0f60be1420000962568dce6d74a009cd04f3ee76 /python | |
parent | 83ea6b424f1bd1e28b226f0a780385c1ad9d6208 (diff) | |
download | refcat-aada9aab955ff5dabb7461795218e0b345bb58d8.tar.gz refcat-aada9aab955ff5dabb7461795218e0b345bb58d8.zip |
tasks: try tsv plus tr; cf:
https://github.com/stedolan/jq/issues/1735#issuecomment-661623119
Diffstat (limited to 'python')
-rw-r--r-- | python/refcat/techreport.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/refcat/techreport.py b/python/refcat/techreport.py index 48c1084..beb0500 100644 --- a/python/refcat/techreport.py +++ b/python/refcat/techreport.py @@ -39,7 +39,8 @@ class BrefDOIOnly(Refcat): def run(self): output = shellout(r""" zstdcat -T0 {input} | - parallel --pipe -j 16 --block 10M "jq -rc '[.source_doi, .target_doi] | @csv'" | + parallel --pipe -j 16 --block 10M "jq -rc '[.source_doi, .target_doi] | @tsv'" | + tr ' ' ',' | perl -F, -lane 'printf qq[%s\n], join ",", sort @F' | zstd -c -T0 > {output} """, |