diff --git a/build.py b/build.py
index 8ea1fe2..01639f7 100755
--- a/build.py
+++ b/build.py
@@ -1,39 +1,33 @@
#!/usr/bin/env python
import yaml
-
-def writeLine(string):
- global menuOut
- menuOut += f"{string}\r\n"
+import markdown
+from jinja2 import Environment, PackageLoader, select_autoescape
+env = Environment(
+ loader=PackageLoader("build"),
+ autoescape=select_autoescape()
+)
with open('menu.yaml', 'r') as file:
menu = yaml.safe_load(file)
+templateMenu = env.get_template("menu.html")
+templateRecipes = env.get_template("recipes.html")
-#print(menu['menu'])
+with open('index.html', 'w') as file:
+ file.write(templateMenu.render(bevs = menu['menu']))
-menuOut = '''\
-
-
-
-Cocktail Menu
-
-
-'''
+with open('recipes.html', 'w') as file:
+ file.write(templateRecipes.render(bevs = menu['menu']))
+
+print(menu['menu'])
for bev in menu['menu']:
#print(bev)
for name in bev:
print(name)
- writeLine(f'{name} ')
- writeLine('')
for ingredient in bev[name]['ingredients']:
- writeLine(f'{ingredient} ')
- writeLine(' ')
+ print(f'{ingredient[list(ingredient)[0]]} {list(ingredient)[0]} ')
+ print(markdown.markdown(bev[name]['directions']))
-menuOut += '''\
-
-
-'''
-
-with open('index.html', 'w') as file:
- file.write(menuOut)
+for ingredient in menu['out_of_stock']:
+ print(ingredient)
diff --git a/index.html b/index.html
index 450c68a..1af2938 100644
--- a/index.html
+++ b/index.html
@@ -1,44 +1,173 @@
+
Cocktail Menu
-Old Fashioned
-
-Bourbon
-Maple syrup
-Angostura bitters
-
-Boulevardier
-
-Bourbon
-Campari
-Sweet vermouth
-
-Sidecar
-
-Bourbon
-Cointreau
-Lemon juice
-
-Gin & Tonic
-
-Gimlet
-
-Gin
-Lime juice
-Simple syrup
-
-Bennet
-
-Gin
-Lime juice
-Simple syrup
-Angostura bitters
-
+
+
+
+ Old Fashioned
+
+
+
+ Bourbon
+
+
+
+ Maple syrup
+
+
+
+ Angostura bitters
+
+
+
+
+
+
+ Boulevardier
+
+
+
+ Bourbon
+
+
+
+ Campari
+
+
+
+ Sweet vermouth
+
+
+
+
+
+
+ Black Manhattan
+
+
+
+ Rye whiskey
+
+
+
+ Amaro
+
+
+
+ Angostura bitters
+
+
+
+ Orange bitters
+
+
+
+
+
+
+ MonteNegroni
+
+
+
+ Amaro Montenegro
+
+
+
+ Gin
+
+
+
+ Sweet vermouth
+
+
+
+ Angostura bitters
+
+
+
+
+
+
+ Sidecar
+
+
+
+ Bourbon
+
+
+
+ Cointreau
+
+
+
+ Lemon juice
+
+
+
+
+
+
+ Gin & Tonic
+
+
+
+ Gin
+
+
+
+ Tonic water
+
+
+
+
+
+
+ Gimlet
+
+
+
+ Gin
+
+
+
+ Lime juice
+
+
+
+ Simple syrup
+
+
+
+
+
+
+ Bennet
+
+
+
+ Gin
+
+
+
+ Lime juice
+
+
+
+ Simple syrup
+
+
+
+ Angostura bitters
+
+
+
+
+
+
+
-
+