From 51b3dde78e2144399122bf61d8c4577feaf7011a Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sat, 14 Mar 2020 13:02:03 +0100 Subject: [PATCH] put timestamp after name in filename --- edit_data_form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit_data_form.py b/edit_data_form.py index 173646c..52ed9e5 100755 --- a/edit_data_form.py +++ b/edit_data_form.py @@ -78,7 +78,7 @@ def main(*_args): new_data['mitgliederdaten'] = dict(zip(app.mem2.keys(), map(lambda f: f.value, app.mem2.values()))) new_data['timestamp'] = datetime.datetime.now().replace(microsecond=0).isoformat() - outfile_name = '{}_{}.json'.format(datetime.date.today().isoformat(), '_'.join(new_data['stammdaten']['fullname'].split())) + outfile_name = '{}_{}.json'.format('_'.join(new_data['stammdaten']['fullname'].split()),datetime.date.today().isoformat()) with open(outfile_name, 'w') as outfile: json.dump(new_data, outfile, sort_keys=True, indent=4)