tilføj bedre sektionsmarkers

This commit is contained in:
Christoffer Müller Madsen 2016-09-17 00:03:01 +02:00
parent 7c809ac711
commit 88521ef067

View File

@ -14,8 +14,9 @@ with open("klandringer.json", "r") as jsonfile:
else: else:
complete_klandringer = json.loads(contents) complete_klandringer = json.loads(contents)
#####################
# Begin definitions # Begin definitions #
#####################
def menu_select_date(): def menu_select_date():
global klandringer global klandringer
@ -51,8 +52,30 @@ def menu_main():
menu_afsluttende() menu_afsluttende()
else: else:
quit() quit()
# Begin klandringer ####################
# Begin indledende #
####################
# TODO: Write indledende
##################
# End indledende #
##################
#####################
# Begin afsluttende #
#####################
# TODO: Write afsluttende
###################
# End afsluttende #
###################
#####################
# Begin klandringer #
#####################
def menu_klandringer(): def menu_klandringer():
code, tag = d.menu("Hvad du vil gøre med klandringerne?", code, tag = d.menu("Hvad du vil gøre med klandringerne?",
@ -144,7 +167,6 @@ def delete_klandring(strid):
return code return code
def batch_mode(): def batch_mode():
#code = create_klandring()
for i,k in enumerate(klandringer): for i,k in enumerate(klandringer):
code = describe_klandring(i) code = describe_klandring(i)
if code != d.OK: if code != d.OK:
@ -156,8 +178,10 @@ def batch_mode():
def save(): def save():
with open("klandringer.json","w") as jsonfile: with open("klandringer.json","w") as jsonfile:
jsonfile.write(json.dumps(complete_klandringer)) jsonfile.write(json.dumps(complete_klandringer))
# End klandringer ###################
# End klandringer #
###################
def new_date(): def new_date():
code, pickdate = d.calendar("Vælg en dato") code, pickdate = d.calendar("Vælg en dato")
@ -170,9 +194,8 @@ def new_date():
else: else:
menu_select_date() menu_select_date()
###################
# End definitions # End definitions #
###################
menu_select_date() menu_select_date()
#menu_main()