diff --git a/build.py b/build.py new file mode 100755 index 0000000..8ea1fe2 --- /dev/null +++ b/build.py @@ -0,0 +1,39 @@ +#!/usr/bin/env python +import yaml + +def writeLine(string): + global menuOut + menuOut += f"{string}\r\n" + +with open('menu.yaml', 'r') as file: + menu = yaml.safe_load(file) + + +#print(menu['menu']) + +menuOut = '''\ + + + +Cocktail Menu + + +''' + +for bev in menu['menu']: + #print(bev) + for name in bev: + print(name) + writeLine(f'

{name}

') + writeLine('') + +menuOut += '''\ + + +''' + +with open('index.html', 'w') as file: + file.write(menuOut)