Loading...
Loading...
Compare original and translation side by side
scripts/generate_menu.pyfrom scripts.generate_menu import create_menu_pdf
import datetime
menu_data = {
'title': 'Family Dinner Menu',
'subtitle': f'Week of {datetime.datetime.now().strftime("%B %d, %Y")}',
'meals': [
{
'day': 'Monday',
'name': 'Grilled Salmon with Roasted Brussels Sprouts',
'protein': 'Salmon fillet (6oz)',
'prep_time': '30 min',
'notes': 'Seasonal fall vegetables'
},
{
'day': 'Tuesday',
'name': 'Monday Leftovers',
'notes': 'Use remaining salmon and veggies'
},
# ... continue for all 7 days
]
}scripts/generate_menu.pyfrom scripts.generate_menu import create_menu_pdf
import datetime
menu_data = {
'title': 'Family Dinner Menu',
'subtitle': f'Week of {datetime.datetime.now().strftime("%B %d, %Y")}',
'meals': [
{
'day': 'Monday',
'name': 'Grilled Salmon with Roasted Brussels Sprouts',
'protein': 'Salmon fillet (6oz)',
'prep_time': '30 min',
'notes': 'Seasonal fall vegetables'
},
{
'day': 'Tuesday',
'name': 'Monday Leftovers',
'notes': 'Use remaining salmon and veggies'
},
# ... continue for all 7 days
]
}
**Menu Data Structure:**
- `title`: Menu title (usually "Family Dinner Menu" or similar)
- `subtitle`: Date range for the week
- `meals`: List of meal objects with:
- `day`: Day of the week (required)
- `name`: Meal name (required)
- `protein`: Primary protein source (optional but recommended)
- `prep_time`: Estimated cooking time (optional)
- `notes`: Special notes like "leftover", "seasonal", "restaurant info" (optional)
**菜单数据结构:**
- `title`: 菜单标题(通常为“家庭晚餐菜单”或类似名称)
- `subtitle`: 当周日期范围
- `meals`: 餐食对象列表,包含:
- `day`: 星期几(必填)
- `name`: 餐食名称(必填)
- `protein`: 主要蛋白质来源(可选但推荐)
- `prep_time`: 预估烹饪时间(可选)
- `notes`: 特殊说明,如“剩菜”、“应季”、“餐厅信息”(可选)