address_label #3
1 changed files with 5 additions and 4 deletions
|
@ -72,10 +72,11 @@ def main(*_args):
|
|||
app = FormApp(member_struct)
|
||||
app.run()
|
||||
new_data = {}
|
||||
new_data['stammdaten'] = dict(zip(app.sd2.keys(), map(lambda f: f.value, app.sd2.values())))
|
||||
new_data['finanzdaten'] = dict(zip(app.fin2.keys(), map(lambda f: f.value, app.fin2.values())))
|
||||
new_data['mitgliederdaten'] = dict(zip(app.mem2.keys(), map(lambda f: f.value, app.mem2.values())))
|
||||
outfile_name = '{}_{}.json'.format(date.today().isoformat(), '_'.join(new_data['stammdaten']['fullname'].split()))
|
||||
new_data['stammdaten']['address_label'] = \
|
||||
f"{new_data['stammdaten']['fullname']}\n \
|
||||
{new_data['stammdaten']['address_street']}\n \
|
||||
{new_data['stammdaten']['address_code']} {new_data['stammdaten']["address_locality"]}"
|
||||
|
||||
with open(outfile_name, 'w') as outfile:
|
||||
json.dump(new_data, outfile, sort_keys=True, indent=4)
|
||||
|
||||
|
|
Loading…
Reference in a new issue