aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-09-10 09:47:32 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-09-10 09:47:32 +0200
commit72c2f524e68b74645ea549466d4215d1b675063e (patch)
treeb0a265700a483e51dda3e9ac739bbf9e7510badd
parent23a7a0d537871427f8fe0bccc8074b3936d52d9b (diff)
downloadrefcat-72c2f524e68b74645ea549466d4215d1b675063e.tar.gz
refcat-72c2f524e68b74645ea549466d4215d1b675063e.zip
tasks: sort needs a tmpdir
-rw-r--r--python/refcat/techreport.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/refcat/techreport.py b/python/refcat/techreport.py
index 4223d18..4fe5771 100644
--- a/python/refcat/techreport.py
+++ b/python/refcat/techreport.py
@@ -20,10 +20,11 @@ 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% |
+ LC_ALL=C sort -T {tmpdir} -S25% |
zstd -c -T0 > {output}
""",
- input=self.input().path)
+ input=self.input().path,
+ tmpdir=self.tmpdir)
luigi.LocalTarget(output).move(self.output().path)
def output(self):
@@ -43,10 +44,11 @@ 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% |
+ LC_ALL=C sort -T {tmpdir} -S25% |
zstd -c -T0 > {output}
""",
- input=self.input().path)
+ input=self.input().path,
+ tmpdir=self.tmpdir)
luigi.LocalTarget(output).move(self.output().path)
def output(self):