-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFoodDice
More file actions
56 lines (45 loc) · 2.11 KB
/
FoodDice
File metadata and controls
56 lines (45 loc) · 2.11 KB
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
48
49
50
51
52
53
54
55
56
#!/usr/bin/env python3
import random
from datetime import date, datetime
year = 2017
seasons = [('spring', (date(year, 3, 20), date(year, 6, 20))),
('summer', (date(year, 6, 21), date(year, 9, 22))),
('fall', (date(year, 9, 23), date(year, 12, 21))),
('winter', (date(year, 12, 22), date(year, 3, 31)))]
def season(now):
if isinstance(now, datetime):
now = now.date()
now = now.replace(year=year)
return next(seasons for seasons, (start, end) in seasons
if start <= now <= end)
cookingMethods = ['gril', 'roast/bake', 'broil', 'saute', 'pan fry', 'braise']
protein = ['beef or tempeh', 'chicken or tofu', 'turkey or seitan', 'fish or cheese', 'pork or eggs', 'lamb or beans']
grainsCarbs = ['rice', 'quinoa', 'pasta', 'polenta', 'potato', 'millet']
herbs = ['rosemary', 'basil', 'oregano', 'cilantro', 'thyme', 'dill']
bonusIngredients = ['mushrooms', 'bacon', 'nuts', 'onions', 'lemon', 'garlic']
springVeggies = ['dandelion greens', 'peas', 'asparagus', 'artichokes', 'spinach', 'radishas']
summerVeggies = ['bell peppers', 'zucchini', 'eggplant', 'tomatoes', 'corn', 'green beans']
fallVeggies = ['mustard greens', 'brussels sprouts', 'squash', 'chard', 'broccoli', 'arugula']
winterVeggies = ['carrots', 'parsnips', 'cabbage', 'fennel', 'endives', 'kale']
random.shuffle(cookingMethods)
random.shuffle(protein)
random.shuffle(grainsCarbs)
random.shuffle(herbs)
random.shuffle(bonusIngredients)
random.shuffle(springVeggies)
random.shuffle(summerVeggies)
random.shuffle(fallVeggies)
random.shuffle(winterVeggies)
print('Cooking Method - '+ cookingMethods[0], '\n'
'Type of Protein - ' + protein[0], '\n'
'Type of Grains or Carbs - ' + grainsCarbs[0], '\n'
'Type of herb - ' + herbs[0], '\n'
'Bonus Ingredient - ' + bonusIngredients[0])
if (season(date.today())) == 'spring':
print('Seasonal Veggie - ' + springVeggies[0])
elif (season(date.today())) == 'summer':
print('Seasonal Veggie - ' + summerVeggies[0])
elif (season(date.today())) == 'fall':
print('Seasonal Veggie - ' + fallVeggies[0])
else:
print('Seasonal Veggie - ' + winterVeggies[0])