Sort result files for sorted download buttons.

This commit is contained in:
Stephan Porada 2019-09-24 16:15:46 +02:00
parent 695a57560f
commit 873997fbbf

View File

@ -31,7 +31,7 @@ def corpus(corpus_id):
'corpora', 'corpora',
str(corpus.id)) str(corpus.id))
files = {} files = {}
for file in os.listdir(dir): for file in sorted(os.listdir(dir)):
files[file] = {} files[file] = {}
files[file]['path'] = os.path.join(file) files[file]['path'] = os.path.join(file)
@ -110,7 +110,7 @@ def job(job_id):
'jobs', 'jobs',
str(job.id)) str(job.id))
files = {} files = {}
for file in os.listdir(dir): for file in sorted(os.listdir(dir)):
if file == 'output': if file == 'output':
continue continue
files[file] = {} files[file] = {}