-
Notifications
You must be signed in to change notification settings - Fork 0
/
barman.py
executable file
·47 lines (36 loc) · 919 Bytes
/
barman.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/python3
from lib import recipe
from lib import ingredients
from lib import cocktails
from lib import cocktailIngredients
from lib import cocktailCategory
from lib import method
from lib import db
print("Welcome to Barman!\n")
database = db.init("sql/create")
db.addIngredients(
database,
ingredients.prepForDatabase(ingredients.load("data/ingredients.yml"))
)
recipes = recipe.load("data/recipes")
db.addCocktails(
database,
cocktails.prepForDatabase(recipes)
)
db.addCocktailIngredients(
database,
cocktailIngredients.prepForDatabase(recipes)
)
db.addCocktailCategories(
database,
cocktailCategory.prepForDatabase(recipes)
)
db.addCocktailMethods(
database,
method.prepForDatabase(recipes)
)
cocktails = db.getPossibleCocktails(database)
print ("Menu\n----")
for cocktail in cocktails:
print(cocktail['name'])
print("\t" + cocktail['description'])