Hello is a foreigner make a flexible weight diet
| Parameter | Value |
|---|---|
| Name | Kevin Richard |
| Age/Sex | 53 years, Male |
| Height | 176 cm |
| Current Weight | 94.9 kg |
| BMI | 30.6 (Obese Class I) |
| Fat % | 31.2% (Desirable: 12-22.9%) |
| Fat Mass | 29.6 kg |
| Muscle Mass | 61.9 kg |
| Visceral Fat Rating | 18 (HIGH - target <10) |
| BMR | 1854 kcal/day |
| Metabolic Age | 64 (actual age 53 - elevated) |
| Ideal Body Weight | 68.1 kg |
| Fat to Lose | 18.1 kg |
| Target Weight | 76.8 kg (at 15% BF) |
| Goal | Calories |
|---|---|
| BMR | 1854 kcal |
| TDEE (moderate activity) | ~2500 kcal |
| Diet target (500-deficit) | ~1800-1900 kcal/day |
| Protein target | 140-150 g/day (1.5 g/kg body weight) |
| Carbs | 150-180 g/day (low-moderate) |
| Fat | 50-60 g/day (healthy fats) |
| Meal | Time | Options (Pick ONE) | Calories (approx.) |
|---|---|---|---|
| Early Morning | 6:30 - 7:00 am | Black coffee (no sugar) OR green tea + 5 soaked almonds | ~50 kcal |
| Breakfast | 8:00 am | Option 1: 3 boiled/poached eggs + 1 multigrain toast + 1 cucumber | ~300 kcal |
| Option 2: 2 egg omelette + 1 idli + sambar (no rice) | ~280 kcal | ||
| Option 3: Vegetable dosa (1 large) + coconut chutney (small) | ~260 kcal | ||
| Mid-Morning | 10:30 - 11:00 am | 1 fruit (apple/guava/pear) OR 1 small cup curd | ~80 kcal |
| Lunch | 1:00 - 2:00 pm | Option 1: Grilled chicken (200g) + 1 cup brown rice + salad | ~450 kcal |
| Option 2: 2 chapati + dal + sabzi + 100g curd | ~400 kcal | ||
| Option 3: Prawn/fish curry (150g protein) + 1 cup brown rice | ~420 kcal | ||
| Evening Snack | 4:30 - 5:00 pm | Handful roasted chana / 2 boiled eggs / 1 cup green tea + 5 walnuts | ~100-120 kcal |
| Dinner | 7:30 - 8:00 pm | Option 1: Grilled chicken/fish (200g) + 2 cups vegetables (sauteed) | ~350 kcal |
| Option 2: Mutton/beef stew (150g) + salad, NO rice | ~320 kcal | ||
| Option 3: Paneer bhurji (150g) + 1 chapati + salad | ~350 kcal | ||
| Bed Time | 10:00 pm | 1 glass warm turmeric milk (low fat) OR skip | ~80 kcal |
| Instead of | Choose This |
|---|---|
| Biryani (full plate) | Half biryani + raita + extra salad |
| Pizza (full) | 2 slices thin-crust + side salad (no extra cheese) |
| Butter chicken + naan x2 | Butter chicken (small) + 1 tandoori roti + dal |
| Pasta with creamy/marinara sauce | Grilled protein (chicken/fish) + soup |
| Sandwich | Whole wheat sandwich with grilled chicken, skip the chips |
| Fried rice | Egg fried rice (half portion) + stir-fry veggies |
| Soft drinks | Lime soda (no sugar) / plain water / sparkling water |
| Day | Breakfast | Lunch | Dinner |
|---|---|---|---|
| Mon | 3 boiled eggs + 1 toast | Grilled chicken + salad + 1 chapati | Fish curry + veggies (no rice) |
| Tue | Idli x2 + sambar | Mutton stew + brown rice (half cup) | Egg stir-fry + 1 chapati |
| Wed | Omelette (2 egg) + multigrain toast | Prawn curry + salad | Grilled chicken + veggies |
| Thu | Dosa (1) + chutney | Dal + 2 chapati + sabzi + curd | Paneer tikka + salad |
| Fri | Boiled eggs x3 | Restaurant: Half biryani + raita | Butter chicken (small) + 1 roti |
| Sat | Egg omelette + toast | Chicken sandwich (whole wheat) | Grilled beef/pork (150g) + veggies |
| Sun | Idli x2 + egg curry | Free meal - lighter dinner | Soup + grilled chicken/fish |
| β INCLUDE (Priority) | β AVOID / LIMIT |
|---|---|
| All proteins: eggs, chicken, fish, prawns, mutton | Maida (refined flour) items: pizza base, white bread |
| Vegetables: all non-starchy veggies | Sugary drinks: soft drinks, packaged juices |
| Brown rice, oats, multigrain bread | Large portions of biryani/fried rice daily |
| Dal, legumes, chana | Pasta with creamy white sauce |
| Curd/low-fat dairy | Deep fried snacks: samosas, pakoras |
| Fruits (1-2/day): apple, guava, papaya | Sweets and desserts (noted as "sometimes" - reduce to rarely) |
| Healthy fats: olive oil, nuts (small qty) | Alcohol |
| Green tea, black coffee (no sugar) | Late night eating after 9pm |
| Milestone | Target | Timeline |
|---|---|---|
| Short term | 90 kg (lose ~5 kg) | 6-8 weeks |
| Mid term | 85 kg (lose ~10 kg) | 3-4 months |
| Long term goal | 76.8 kg (lose ~18 kg) | 6-9 months |
| Rate of loss | 0.5-1 kg/week | Safe & sustainable |
This is too south indian coded
What is Kevin's background / what cuisines does he typically eat? Β· What format works best for the diet plan?
| Nutrient | Target |
|---|---|
| Calories | 1800 - 1900 kcal/day |
| Protein | 140 - 150 g/day |
| Carbohydrates | 150 - 170 g/day |
| Fat | 55 - 65 g/day |
| Fibre | 25 - 30 g/day |
| Water | 3+ litres/day |
BMR is 1854 kcal. TDEE with gym activity ~2450 kcal. A 500-600 kcal deficit gives safe loss of 0.5-1 kg/week.
| Option | Macros |
|---|---|
| Black coffee (no sugar) + 5 almonds | P: 2g C: 2g F: 5g |
| Green tea + small handful of mixed nuts | P: 2g C: 3g F: 6g |
Avoid orange juice in the morning - it spikes blood sugar fast and adds empty calories.
| Option | Meal | Protein | Carbs | Fat | Kcal |
|---|---|---|---|---|---|
| A | 3-egg omelette (mushroom + spinach) + 1 slice wholegrain toast | 24g | 18g | 16g | 310 |
| B | 2 scrambled eggs + 2 turkey/chicken rashers + 1 slice rye bread | 30g | 16g | 12g | 290 |
| C | Greek yoghurt (200g, full fat) + 2 tbsp granola + handful berries | 18g | 32g | 10g | 290 |
| D | 2-egg omelette + smoked salmon (80g) + 1 slice sourdough | 32g | 20g | 14g | 330 |
| E | Protein shake (whey, 30g) + 1 banana + 1 tbsp peanut butter | 28g | 30g | 9g | 315 |
| Option | Meal | Protein | Carbs | Fat | Kcal |
|---|---|---|---|---|---|
| A | Grilled chicken breast (200g) + roasted sweet potato (100g) + side salad | 46g | 28g | 8g | 370 |
| B | Beef steak (170g lean) + steamed broccoli + Β½ cup cooked brown rice | 42g | 30g | 12g | 400 |
| C | Grilled salmon fillet (180g) + asparagus + 1 small dinner roll | 40g | 25g | 18g | 420 |
| D | Chicken wrap (1 wholegrain tortilla, grilled chicken, lettuce, tomato, light mayo) | 35g | 35g | 14g | 410 |
| E | Pork tenderloin (170g) + green beans + Β½ cup mashed potato (no butter) | 40g | 28g | 10g | 360 |
| F | Prawn stir-fry (200g prawns) + mixed veg + Β½ cup noodles (udon or soba) | 38g | 35g | 8g | 370 |
| G | Restaurant pick: Caesar salad + grilled chicken (ask for dressing on the side) | 32g | 14g | 18g | 340 |
| H | Restaurant pick: Grilled fish + steamed veg + small portion fries (not large) | 38g | 30g | 15g | 410 |
Rule: Keep carbs LOW at dinner. Load up on protein + vegetables.
| Option | Meal | Protein | Carbs | Fat | Kcal |
|---|---|---|---|---|---|
| A | Grilled chicken thighs (200g) + roasted vegetables (courgette, peppers, onion) | 44g | 14g | 14g | 360 |
| B | Pan-seared salmon (200g) + green salad + olive oil dressing | 42g | 6g | 22g | 390 |
| C | Beef burger patty (170g, no bun) + lettuce, tomato, mustard + side salad | 36g | 10g | 18g | 350 |
| D | Lamb chops (150g) + roasted asparagus + 1 small sweet potato | 38g | 22g | 18g | 400 |
| E | Pork ribs (150g, grilled not fried) + coleslaw (light) + corn on the cob | 36g | 24g | 16g | 380 |
| F | Prawn/shrimp (200g) + stir-fried vegetables + garlic butter (1 tsp) | 40g | 10g | 14g | 330 |
| G | Mutton stew (150g lean) + 1 cup mixed vegetable soup | 38g | 16g | 14g | 340 |
| H | Restaurant pick: Grilled steak + side salad + vegetables (skip the chips or ask for half) | 42g | 8g | 18g | 360 |
| I | Restaurant pick: Roast chicken + vegetables (skip the gravy or ask for it on the side) | 40g | 12g | 14g | 340 |
| Day | Breakfast | Lunch | Dinner | ~Total kcal |
|---|---|---|---|---|
| Mon | 3-egg omelette + toast (A) | Grilled chicken + sweet potato (A) | Salmon + green salad (B) | 1,830 |
| Tue | Scrambled eggs + turkey rashers (B) | Beef steak + broccoli + rice (B) | Chicken thighs + roasted veg (A) | 1,850 |
| Wed | Greek yoghurt + granola + berries (C) | Chicken wrap (D) | Burger patty no bun + salad (C) | 1,800 |
| Thu | Smoked salmon omelette + sourdough (D) | Grilled salmon + asparagus (C) | Lamb chops + sweet potato (D) | 1,880 |
| Fri | Protein shake + banana + PB (E) | Caesar salad + grilled chicken [OUT] (G) | Steak + salad + veg [OUT] (H) | 1,820 |
| Sat | 3-egg omelette + toast (A) | Prawn stir-fry + noodles (F) | Pork ribs + coleslaw + corn (E) | 1,850 |
| Sun | Scrambled eggs + turkey rashers (B) | Pork tenderloin + green beans (E) | Prawn stir-fry + veg (F) | 1,800 |
| What He Currently Eats | Smarter Swap | Saves |
|---|---|---|
| Pizza (whole) | 2 slices thin crust + side salad | ~400 kcal |
| Butter chicken + 2 naans | Grilled chicken + 1 bread | ~350 kcal |
| Pasta with marinara/cream sauce | Grilled protein + clear soup | ~300 kcal |
| Burgers with large fries | Burger + side salad (skip bun or swap) | ~300 kcal |
| Orange juice at breakfast | Water with lemon or black coffee | ~120 kcal |
| Dessert after dinner | Black coffee or herbal tea | ~300 kcal |
| Beer/wine with meal | Sparkling water / lime soda | ~200 kcal |
| # | Action | Why |
|---|---|---|
| 1 | Sleep by 11 PM | Late nights raise cortisol, which directly drives belly fat and visceral fat accumulation |
| 2 | Drink 3L water daily | Currently only 1-2L - dehydration reduces fat burning and increases hunger signals |
| 3 | Eat dinner before 8 PM | Late eating disrupts insulin sensitivity, especially critical given family history of diabetes |
| 4 | No carbs after 8 PM | Protein + veg only if eating late on some nights |
| 5 | Get fasting glucose + HbA1c tested | Both parents are diabetic - he is high risk. Visceral fat rating of 18 compounds this risk |
| 6 | Keep gym at 5-6x/week | Muscle mass (61.9 kg) must be preserved - resistance training is non-negotiable |
| 7 | Reduce smoking | Impacts fat oxidation and cardiovascular risk |
| Milestone | Weight | Timeline |
|---|---|---|
| -5 kg | 89.9 kg | 6-8 weeks |
| -10 kg | 84.9 kg | 3-4 months |
| Goal weight | 76.8 kg | 6-9 months |
How to diet counsel him
| What to Show | What to Say |
|---|---|
| BMI 30.6 | "You are just into the obese range - but the good news is you are right at the border, not deep into it." |
| Fat % 31.2% | "Nearly a third of your body is fat. The healthy range for a man your age is 12-22%. We need to bring this down by about 10 percentage points." |
| Visceral Fat Rating 18 | "This is the dangerous one. Visceral fat wraps around your liver, pancreas and heart. Normal is under 12. Yours is 18. This is what causes diabetes, heart disease and strokes - not just how you look." |
| Metabolic Age 64 | "Your metabolism is running like a 64-year-old's body, but you are 53. That gap is reversible with the right eating and training." |
| Fat to lose: 18.1 kg | "Your target is 76.8 kg. That is 18 kg of fat to lose. At a safe pace of 1 kg/week that is about 5-6 months of consistent work." |
| Muscle Mass 61.9 kg | "You have good muscle. Your gym work is protecting it. We want to keep every gram of that muscle while losing the fat." |
Visual tip: Draw a simple circle on paper - shade 31% of it and say "this portion is fat." It lands better than just saying "31%."
"Both your parents have diabetes. Right now you do not - but your visceral fat rating of 18 means your liver and pancreas are under pressure. Every kilo of belly fat you lose directly reduces that risk. This is not about looks. This is about not getting your parents' disease."
"When you eat after 9pm, your insulin is less effective at night. The food you eat gets stored as fat much more easily than the same meal eaten at 6pm. Your dinner at 8pm is already late. Sleeping after midnight makes it worse. This single change - eating earlier and sleeping earlier - can shift 2-3 kg in the first month without changing anything else."
"You are already training 5-6 times a week, which is excellent. But you cannot outrun a bad diet. 1 hour of gym burns roughly 400-500 kcal. One pizza or biryani adds back 800-1000 kcal. The diet is where the fat loss actually happens."
"Because you eat all meats - chicken, beef, pork, mutton, prawns - you have a huge advantage. Protein is the most filling macronutrient. A high-protein meal keeps you full for 3-4 hours, reduces cravings, and protects your muscle while you lose fat. We are going to build every meal around protein first."
"I am not going to give you a list of foods you cannot eat. Instead, I am going to give you a simple system you can use anywhere - at a restaurant, at home, at a work lunch."
βββββββββββββββββββββββββββ
β HALF THE PLATE β
β β Vegetables / Salad β
ββββββββββββ¬βββββββββββββββ€
β QUARTER β QUARTER β
β Protein β Carbs β
β (meat, β (rice, bread,β
β eggs, β pasta - 1 β
β fish) β fist-size) β
ββββββββββββ΄βββββββββββββββ
"At any restaurant, just apply this. Half your plate is vegetables or salad. One quarter is your protein - steak, chicken, fish, whatever you like. One quarter is your carbs - a small portion of rice or one piece of bread. That is the whole system."
"This meal is the biggest issue. It is late, it is heavy in carbs and fat, and you are eating it right before bed. We are not saying never eat pizza again. We are saying: make this your rare treat, not your daily dinner. On normal days, dinner should be grilled meat + vegetables - fast, easy, filling, low calorie."
"This surprises a lot of people. A glass of orange juice is basically sugar water - all the fibre of the orange is removed, and it spikes your blood sugar immediately. Replace it with plain water or black coffee. This one swap saves you about 120 calories every single day."
"You are going from 8am breakfast to lunch with nothing in between. By lunchtime you are very hungry, so you eat too much at lunch - biryani, sandwiches. If you eat a small snack at 10:30am - 2 boiled eggs or a handful of nuts - you arrive at lunch only slightly hungry and make better choices."
| Goal | Why This One First |
|---|---|
| 1. Dinner before 8pm, no food after 9pm | Biggest single impact on visceral fat and insulin sensitivity |
| 2. Replace OJ with water/black coffee | Easy win, 120 kcal saved daily, no real sacrifice |
| 3. Add a mid-morning snack (2 boiled eggs or nuts) | Reduces lunch overeating immediately |
"These 3 changes alone, without touching anything else, should show 1-2 kg on the scale in the first 2 weeks."
| What He Might Say | How to Respond |
|---|---|
| "I travel a lot / always in meetings" | "That is fine - the plate method works anywhere. Steak and salad at any restaurant fits perfectly." |
| "I enjoy my food / I don't want to give things up" | "You are not giving anything up permanently. You are making smarter versions of what you already eat. You can still have pizza - just not every day." |
| "I already go to the gym 5-6 times a week" | "That is working - your muscle mass is very good. Now we match your diet to your training and the results will come." |
| "I don't cook at home" | "Perfect - we have built this plan entirely around restaurant and takeaway options. Everything on this plan you can order." |
| "Will this actually work at my age?" | "Yes - in fact at 53 with good muscle mass from the gym, you respond well to dietary changes. The metabolic age of 64 can come down to 53 or below within 6 months." |
"In the first 2 weeks expect to lose 1-2 kg, mostly water weight. From week 3 onwards you will start losing actual fat at 0.5-1 kg per week. Do not panic if the scale does not move in week 1 - your body is adjusting."
| Time | What Happens |
|---|---|
| 0-5 min | Rapport building, put him at ease |
| 5-12 min | Show and explain Tanita results in plain language |
| 12-17 min | Ask open questions, find his barriers |
| 17-22 min | Explain the "why" - visceral fat, diabetes risk, late eating |
| 22-27 min | Present the plate method and flexible diet plan |
| 27-32 min | Address his 3 specific problem meals |
| 32-35 min | Set 3 goals for the next 2 weeks |
| 35-40 min | Handle questions, book follow-up, close confidently |
"You already have the gym habit. Now we fix the kitchen. You eat the same foods you love - just smarter portions, earlier timing, and more protein. That is the entire plan."
Printable diet chart
ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && echo "created"
mkdir -p /tmp/workspace/kevin-diet && cat > /tmp/workspace/kevin-diet/create_diet_chart.py << 'PYEOF' from docx import Document from docx.shared import Pt, Inches, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT, WD_ALIGN_VERTICAL from docx.oxml.ns import qn from docx.oxml import OxmlElement import copy doc = Document() # ββ Page margins ββββββββββββββββββββββββββββββββββββββββββββββ section = doc.sections[0] section.page_width = Cm(21) section.page_height = Cm(29.7) section.left_margin = Cm(1.5) section.right_margin = Cm(1.5) section.top_margin = Cm(1.5) section.bottom_margin = Cm(1.5) # ββ Default Normal style βββββββββββββββββββββββββββββββββββββββ normal = doc.styles['Normal'] normal.font.name = 'Arial' normal.font.size = Pt(9) # ββ Helper: set cell background colour ββββββββββββββββββββββββ def set_cell_bg(cell, hex_color): tc = cell._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear') shd.set(qn('w:color'), 'auto') shd.set(qn('w:fill'), hex_color) tcPr.append(shd) def set_cell_border(cell, top=None, bottom=None, left=None, right=None): tc = cell._tc tcPr = tc.get_or_add_tcPr() tcBorders = OxmlElement('w:tcBorders') for side, val in [('top', top), ('bottom', bottom), ('left', left), ('right', right)]: if val: el = OxmlElement(f'w:{side}') el.set(qn('w:val'), val.get('val', 'single')) el.set(qn('w:sz'), str(val.get('sz', 4))) el.set(qn('w:space'), '0') el.set(qn('w:color'), val.get('color', '000000')) tcBorders.append(el) tcPr.append(tcBorders) def bold_run(para, text, size=None, color=None, italic=False): run = para.add_run(text) run.bold = True if italic: run.italic = True if size: run.font.size = Pt(size) if color: run.font.color.rgb = RGBColor(*bytes.fromhex(color)) return run def normal_run(para, text, size=None, color=None): run = para.add_run(text) if size: run.font.size = Pt(size) if color: run.font.color.rgb = RGBColor(*bytes.fromhex(color)) return run # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # HEADER BLOCK # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ header_tbl = doc.add_table(rows=1, cols=2) header_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER header_tbl.style = 'Table Grid' w = header_tbl.columns[0].width # will set via cell width below lc = header_tbl.cell(0, 0) rc = header_tbl.cell(0, 1) set_cell_bg(lc, '1B5E20') # dark green set_cell_bg(rc, 'F9FBE7') # light cream # Left cell β clinic name lp = lc.paragraphs[0] lp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(lp, 'KOLORS HEALTH CARE', size=14, color='FFFFFF') lc.add_paragraph('').add_run('Slimming & Wellness Program').font.color.rgb = RGBColor(0xC8, 0xE6, 0xC9) lc.paragraphs[-1].alignment = WD_ALIGN_PARAGRAPH.CENTER # Right cell β client details rp = rc.paragraphs[0] bold_run(rp, 'PERSONALISED DIET CHART', size=12, color='1B5E20') rp.alignment = WD_ALIGN_PARAGRAPH.CENTER details = [ ('Client', 'Kevin Richard'), ('Age / Sex', '53 yrs | Male'), ('Weight', '94.9 kg | BMI: 30.6'), ('Fat %', '31.2% | Visceral Fat: 18'), ('Target Weight', '76.8 kg (lose 18.1 kg)'), ('Date', '25 July 2026'), ('Counsellor', 'Hajira'), ] for label, val in details: dp = rc.add_paragraph() dp.alignment = WD_ALIGN_PARAGRAPH.LEFT bold_run(dp, f'{label}: ', size=8.5, color='33691E') normal_run(dp, val, size=8.5) doc.add_paragraph() # spacer # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # CALORIE / MACRO TARGETS BAR # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ macro_tbl = doc.add_table(rows=2, cols=5) macro_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER macro_tbl.style = 'Table Grid' headers_m = ['CALORIES', 'PROTEIN', 'CARBS', 'FAT', 'WATER'] values_m = ['1800β1900 kcal', '140β150 g', '150β170 g', '55β65 g', '3+ litres'] colors_m = ['1565C0', '558B2F', 'E65100', '6A1B9A', '00838F'] for i, (h, v, c) in enumerate(zip(headers_m, values_m, colors_m)): hc = macro_tbl.cell(0, i) vc = macro_tbl.cell(1, i) set_cell_bg(hc, c) set_cell_bg(vc, 'F5F5F5') hp = hc.paragraphs[0] hp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(hp, h, size=8, color='FFFFFF') vp = vc.paragraphs[0] vp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(vp, v, size=9, color=c) doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # MEAL PLAN TABLE # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ p = doc.add_paragraph() bold_run(p, ' DAILY MEAL PLAN β Choose Any One Option Per Meal', size=11, color='FFFFFF') p.alignment = WD_ALIGN_PARAGRAPH.CENTER pPr = p._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear'); shd.set(qn('w:color'), 'auto'); shd.set(qn('w:fill'), '2E7D32') pPr.append(shd) meals = [ { 'time': '6:30 β 7:00 AM', 'meal': 'EARLY MORNING', 'color': 'FFF8E1', 'hcolor':'F57F17', 'kcal': '~50 kcal', 'options': [ ('Option A', 'Black coffee (no sugar) + 5 almonds', 'P: 2g C: 2g F: 5g'), ('Option B', 'Green tea + small handful mixed nuts', 'P: 2g C: 3g F: 6g'), ] }, { 'time': '8:00 AM', 'meal': 'BREAKFAST', 'color': 'E8F5E9', 'hcolor':'2E7D32', 'kcal': '~320β350 kcal', 'options': [ ('Option A', '3-egg omelette (mushroom + spinach) + 1 wholegrain toast', 'P: 24g C: 18g F: 16g'), ('Option B', '2 scrambled eggs + 2 turkey rashers + 1 rye bread slice', 'P: 30g C: 16g F: 12g'), ('Option C', 'Greek yoghurt (200g) + 2 tbsp granola + handful berries', 'P: 18g C: 32g F: 10g'), ('Option D', '2-egg omelette + smoked salmon (80g) + 1 sourdough slice', 'P: 32g C: 20g F: 14g'), ('Option E', 'Whey protein shake (30g) + 1 banana + 1 tbsp peanut butter','P: 28g C: 30g F: 9g'), ] }, { 'time': '10:30 AM', 'meal': 'MID-MORNING SNACK', 'color': 'FFF3E0', 'hcolor':'E65100', 'kcal': '~100β120 kcal', 'options': [ ('Option A', '1 apple + 10 almonds', 'P: 4g C: 22g F: 7g'), ('Option B', '2 boiled eggs', 'P: 12g C: 1g F: 10g'), ('Option C', '100g low-fat cottage cheese + cucumber sticks', 'P: 12g C: 5g F: 2g'), ('Option D', '1 small protein bar (< 10g sugar)', 'P: 10g C: 15g F: 5g'), ] }, { 'time': '1:00 β 2:00 PM', 'meal': 'LUNCH', 'color': 'E3F2FD', 'hcolor':'1565C0', 'kcal': '~400β450 kcal', 'options': [ ('Option A', 'Grilled chicken breast (200g) + roasted sweet potato + salad', 'P: 46g C: 28g F: 8g'), ('Option B', 'Beef steak (170g lean) + steamed broccoli + Β½ cup brown rice', 'P: 42g C: 30g F: 12g'), ('Option C', 'Grilled salmon fillet (180g) + asparagus + 1 small roll', 'P: 40g C: 25g F: 18g'), ('Option D', 'Chicken wrap β wholegrain tortilla, grilled chicken, light mayo', 'P: 35g C: 35g F: 14g'), ('Option E', 'Pork tenderloin (170g) + green beans + small mashed potato', 'P: 40g C: 28g F: 10g'), ('Option F', 'Prawn stir-fry (200g) + mixed veg + Β½ cup soba noodles', 'P: 38g C: 35g F: 8g'), ('Option G', 'π½ RESTAURANT: Caesar salad + grilled chicken, dressing on side', 'P: 32g C: 14g F: 18g'), ('Option H', 'π½ RESTAURANT: Grilled fish + steamed veg + small fries', 'P: 38g C: 30g F: 15g'), ] }, { 'time': '4:30 β 5:00 PM', 'meal': 'AFTERNOON SNACK', 'color': 'F3E5F5', 'hcolor':'6A1B9A', 'kcal': '~100β130 kcal', 'options': [ ('Option A', '100g low-fat Greek yoghurt + 1 tsp honey', 'P: 10g C: 12g F: 3g'), ('Option B', '25g mixed nuts', 'P: 5g C: 6g F: 14g'), ('Option C', 'Celery/carrot sticks + 2 tbsp hummus', 'P: 4g C: 12g F: 6g'), ('Option D', '2 hard-boiled eggs', 'P: 12g C: 1g F: 10g'), ] }, { 'time': '7:30 β 8:00 PM', 'meal': 'DINNER (low-carb)', 'color': 'E8EAF6', 'hcolor':'283593', 'kcal': '~350β400 kcal', 'options': [ ('Option A', 'Grilled chicken thighs (200g) + roasted courgette, peppers, onion', 'P: 44g C: 14g F: 14g'), ('Option B', 'Pan-seared salmon (200g) + green salad + olive oil dressing', 'P: 42g C: 6g F: 22g'), ('Option C', 'Beef burger patty (170g, no bun) + lettuce, tomato, mustard + salad', 'P: 36g C: 10g F: 18g'), ('Option D', 'Lamb chops (150g) + roasted asparagus + 1 small sweet potato', 'P: 38g C: 22g F: 18g'), ('Option E', 'Pork ribs (150g grilled) + light coleslaw + corn on the cob', 'P: 36g C: 24g F: 16g'), ('Option F', 'Prawn/shrimp (200g) + stir-fried veg + garlic (1 tsp butter)', 'P: 40g C: 10g F: 14g'), ('Option G', 'π½ RESTAURANT: Grilled steak + side salad + veg (skip chips)', 'P: 42g C: 8g F: 18g'), ('Option H', 'π½ RESTAURANT: Roast chicken + vegetables (gravy on the side)', 'P: 40g C: 12g F: 14g'), ] }, ] for meal in meals: tbl = doc.add_table(rows=1 + len(meal['options']), cols=4) tbl.style = 'Table Grid' tbl.alignment = WD_TABLE_ALIGNMENT.CENTER # set column widths widths = [Cm(2.8), Cm(1.5), Cm(9.5), Cm(3.4)] for row in tbl.rows: for i, cell in enumerate(row.cells): cell.width = widths[i] # Header row hdr = tbl.rows[0] set_cell_bg(hdr.cells[0], meal['hcolor']) set_cell_bg(hdr.cells[1], meal['hcolor']) set_cell_bg(hdr.cells[2], meal['hcolor']) set_cell_bg(hdr.cells[3], meal['hcolor']) p0 = hdr.cells[0].paragraphs[0] p0.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p0, meal['time'], size=8, color='FFFFFF') p1 = hdr.cells[1].paragraphs[0] p1.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p1, meal['kcal'], size=7.5, color='FFFFFF') p2 = hdr.cells[2].paragraphs[0] p2.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p2, meal['meal'], size=10, color='FFFFFF') p3 = hdr.cells[3].paragraphs[0] p3.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p3, 'MACROS', size=8, color='FFFFFF') # Option rows for i, (opt, desc, macros) in enumerate(meal['options']): row = tbl.rows[i + 1] bg = meal['color'] if i % 2 == 0 else 'FAFAFA' for c in row.cells: set_cell_bg(c, bg) # Option label (col 0) spans description is in col 2 op = row.cells[0].paragraphs[0] op.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(op, opt, size=8, color=meal['hcolor']) # Empty col 1 (visual breathing room) row.cells[1].paragraphs[0].add_run('') # Description dp = row.cells[2].paragraphs[0] normal_run(dp, desc, size=8.5) # Macros mp = row.cells[3].paragraphs[0] mp.alignment = WD_ALIGN_PARAGRAPH.CENTER normal_run(mp, macros, size=7.5, color='555555') doc.add_paragraph() # spacer between meals # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # GOLDEN RULES BOX # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ p = doc.add_paragraph() bold_run(p, ' KEY RULES TO FOLLOW DAILY', size=11, color='FFFFFF') p.alignment = WD_ALIGN_PARAGRAPH.LEFT pPr = p._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear'); shd.set(qn('w:color'), 'auto'); shd.set(qn('w:fill'), 'BF360C') pPr.append(shd) rules = [ ('π Dinner before 8 PM β no food after 9 PM.', 'Late eating stores fat directly. Critical for visceral fat reduction.'), ('π§ Drink 3 litres of water daily.', 'Currently only 1β2 L. Dehydration slows fat burning and increases hunger.'), ('β Replace morning OJ with black coffee or water.', 'OJ = liquid sugar. Saves ~120 kcal daily with zero sacrifice.'), ('π₯© Build every meal around protein first.', 'Chicken, beef, pork, fish, eggs, prawns β all are your best tools.'), ('π½ Half plate = vegetables at every meal.', 'Use the plate method at every restaurant β no need to count calories.'), ('π΄ Sleep by 11 PM.', 'Late sleep raises cortisol, which drives belly fat. Metabolic age is 64 β fix the sleep.'), ('π¬ Reduce smoking.', 'Smoking blunts fat oxidation and raises cardiovascular risk.'), ('π Keep gym 5β6Γ/week.', 'Muscle mass (61.9 kg) must be protected. Resistance training is essential.'), ] rules_tbl = doc.add_table(rows=len(rules), cols=2) rules_tbl.style = 'Table Grid' for i, (rule, reason) in enumerate(rules): bg = 'FBE9E7' if i % 2 == 0 else 'FFFFFF' rc0 = rules_tbl.cell(i, 0) rc1 = rules_tbl.cell(i, 1) set_cell_bg(rc0, bg) set_cell_bg(rc1, bg) rc0.width = Cm(8) rc1.width = Cm(9.2) p0 = rc0.paragraphs[0] bold_run(p0, rule, size=8.5, color='BF360C') p1 = rc1.paragraphs[0] normal_run(p1, reason, size=8) doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # EATING OUT SWAPS # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ p = doc.add_paragraph() bold_run(p, ' SMART SWAPS WHEN EATING OUT', size=11, color='FFFFFF') p.alignment = WD_ALIGN_PARAGRAPH.LEFT pPr = p._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear'); shd.set(qn('w:color'), 'auto'); shd.set(qn('w:fill'), '006064') pPr.append(shd) swaps = [ ('Whole pizza', 'thin-crust Γ 2 slices + side salad', '~400 kcal saved'), ('Butter chicken + naan', 'Grilled chicken + 1 bread only', '~350 kcal saved'), ('Pasta with cream sauce','Grilled protein + clear soup', '~300 kcal saved'), ('Burger + large fries', 'Burger patty + side salad (skip bun)', '~300 kcal saved'), ('Orange juice at 8 AM', 'Black coffee or lemon water', '~120 kcal saved'), ('Soft drinks with meals','Sparkling water / lime soda (no sugar)', '~180 kcal saved'), ] swap_tbl = doc.add_table(rows=1 + len(swaps), cols=3) swap_tbl.style = 'Table Grid' # header for i, hdr_txt in enumerate(['INSTEAD OF', 'CHOOSE THIS', 'SAVING']): hc = swap_tbl.cell(0, i) set_cell_bg(hc, '006064') hp = hc.paragraphs[0] hp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(hp, hdr_txt, size=8.5, color='FFFFFF') for i, (avoid, choose, saving) in enumerate(swaps): bg = 'E0F7FA' if i % 2 == 0 else 'FFFFFF' row = swap_tbl.rows[i + 1] for ci in range(3): set_cell_bg(row.cells[ci], bg) normal_run(row.cells[0].paragraphs[0], avoid, size=8.5) bold_run( row.cells[1].paragraphs[0], choose, size=8.5, color='00695C') rp = row.cells[2].paragraphs[0] rp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(rp, saving, size=8, color='2E7D32') doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # WEIGHT MILESTONES # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ p = doc.add_paragraph() bold_run(p, ' WEIGHT LOSS MILESTONES', size=11, color='FFFFFF') pPr = p._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear'); shd.set(qn('w:color'), 'auto'); shd.set(qn('w:fill'), '37474F') pPr.append(shd) miles = [ ('Short Term', 'β5 kg', '89.9 kg', '6β8 weeks'), ('Mid Term', 'β10 kg', '84.9 kg', '3β4 months'), ('Long Term β','β18.1 kg','76.8 kg', '6β9 months'), ] m_tbl = doc.add_table(rows=1 + len(miles), cols=4) m_tbl.style = 'Table Grid' for i, h in enumerate(['GOAL', 'LOSS', 'TARGET WEIGHT', 'TIMELINE']): hc = m_tbl.cell(0, i) set_cell_bg(hc, '37474F') hp = hc.paragraphs[0] hp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(hp, h, size=8.5, color='FFFFFF') m_colors = ['ECEFF1', 'CFD8DC', 'B0BEC5'] for i, (goal, loss, weight, time) in enumerate(miles): row = m_tbl.rows[i + 1] for ci in range(4): set_cell_bg(row.cells[ci], m_colors[i]) for ci, txt in enumerate([goal, loss, weight, time]): p = row.cells[ci].paragraphs[0] p.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p, txt, size=9, color='1A237E' if i == 2 else '263238') doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # FOOTER # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ footer_p = doc.add_paragraph() footer_p.alignment = WD_ALIGN_PARAGRAPH.CENTER normal_run(footer_p, 'This diet chart was prepared by Kolors Health Care on 25 July 2026 ' 'for Kevin Richard. Next review: 4 weeks. Counsellor: Hajira | ' 'For queries contact your Kolors centre.', size=7.5, color='888888') # ββ Save ββββββββββββββββββββββββββββββββββββββββββββββββββββββ out = '/tmp/workspace/kevin-diet/Kevin_Richard_Diet_Chart.docx' doc.save(out) print(f"Saved: {out}") PYEOF python3 /tmp/workspace/kevin-diet/create_diet_chart.py
ls -lh /tmp/workspace/kevin-diet/
Kevin Richard Diet Chart
Word Document Β· DOCX
| Section | Details |
|---|---|
| Header | Kolors Health Care branding, Kevin's full stats from Tanita |
| Macro targets bar | Colour-coded blocks - calories, protein, carbs, fat, water |
| Full meal plan | 6 meals with colour-coded time bands, all options (A-H), macros per option |
| Restaurant options | Marked separately inside the meal table for easy reference |
| Key rules box | 8 daily rules with reasoning |
| Smart swaps | Eating out substitutions with calorie savings |
| Weight milestones | 3-stage target table |
| Footer | Clinic name, date, counsellor, review date |
Many foods mentioned in diet chart is not easily available make a flexible diet chart and he doesn't smoke only alcohol
cat > /tmp/workspace/kevin-diet/create_diet_chart_v2.py << 'PYEOF' from docx import Document from docx.shared import Pt, Inches, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT, WD_ALIGN_VERTICAL from docx.oxml.ns import qn from docx.oxml import OxmlElement doc = Document() # ββ Page margins ββββββββββββββββββββββββββββββββββββββββββββββ section = doc.sections[0] section.page_width = Cm(21) section.page_height = Cm(29.7) section.left_margin = Cm(1.5) section.right_margin = Cm(1.5) section.top_margin = Cm(1.5) section.bottom_margin = Cm(1.5) normal = doc.styles['Normal'] normal.font.name = 'Arial' normal.font.size = Pt(9) # ββ Helpers ββββββββββββββββββββββββββββββββββββββββββββββββββββ def set_cell_bg(cell, hex_color): tc = cell._tc tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear') shd.set(qn('w:color'), 'auto') shd.set(qn('w:fill'), hex_color) tcPr.append(shd) def shade_para(para, hex_color): pPr = para._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'), 'clear') shd.set(qn('w:color'), 'auto') shd.set(qn('w:fill'), hex_color) pPr.append(shd) def bold_run(para, text, size=None, color=None, italic=False): run = para.add_run(text) run.bold = True if italic: run.italic = True if size: run.font.size = Pt(size) if color: run.font.color.rgb = RGBColor(*bytes.fromhex(color)) return run def normal_run(para, text, size=None, color=None): run = para.add_run(text) if size: run.font.size = Pt(size) if color: run.font.color.rgb = RGBColor(*bytes.fromhex(color)) return run def add_section_header(doc, text, bg_color): p = doc.add_paragraph() bold_run(p, f' {text}', size=11, color='FFFFFF') p.alignment = WD_ALIGN_PARAGRAPH.LEFT shade_para(p, bg_color) return p # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # HEADER # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ header_tbl = doc.add_table(rows=1, cols=2) header_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER header_tbl.style = 'Table Grid' lc = header_tbl.cell(0, 0) rc = header_tbl.cell(0, 1) set_cell_bg(lc, '1B5E20') set_cell_bg(rc, 'F9FBE7') lp = lc.paragraphs[0] lp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(lp, 'KOLORS HEALTH CARE', size=14, color='FFFFFF') lp2 = lc.add_paragraph('Slimming & Wellness Program') lp2.alignment = WD_ALIGN_PARAGRAPH.CENTER lp2.runs[0].font.color.rgb = RGBColor(0xC8, 0xE6, 0xC9) lp2.runs[0].font.size = Pt(9) rp = rc.paragraphs[0] bold_run(rp, 'PERSONALISED DIET CHART', size=12, color='1B5E20') rp.alignment = WD_ALIGN_PARAGRAPH.CENTER details = [ ('Client', 'Kevin Richard'), ('Age / Sex', '53 yrs | Male'), ('Weight', '94.9 kg | BMI: 30.6'), ('Fat %', '31.2% | Visceral Fat Rating: 18 (HIGH)'), ('Target Weight', '76.8 kg (Fat to lose: 18.1 kg)'), ('Date', '25 July 2026'), ('Counsellor', 'Hajira'), ] for label, val in details: dp = rc.add_paragraph() dp.alignment = WD_ALIGN_PARAGRAPH.LEFT bold_run(dp, f'{label}: ', size=8.5, color='33691E') normal_run(dp, val, size=8.5) doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # MACRO TARGETS # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ macro_tbl = doc.add_table(rows=2, cols=5) macro_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER macro_tbl.style = 'Table Grid' headers_m = ['CALORIES', 'PROTEIN', 'CARBS', 'FAT', 'WATER'] values_m = ['1800β1900 kcal','140β150 g', '150β170 g', '55β65 g', '3+ litres'] colors_m = ['1565C0', '558B2F', 'E65100', '6A1B9A', '00838F'] for i, (h, v, c) in enumerate(zip(headers_m, values_m, colors_m)): hc = macro_tbl.cell(0, i) vc = macro_tbl.cell(1, i) set_cell_bg(hc, c) set_cell_bg(vc, 'F5F5F5') hp = hc.paragraphs[0]; hp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(hp, h, size=8, color='FFFFFF') vp = vc.paragraphs[0]; vp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(vp, v, size=9, color=c) doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # MEAL PLAN β universally available foods only # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ add_section_header(doc, 'DAILY MEAL PLAN β Pick Any ONE Option Per Meal', '2E7D32') meals = [ { 'time': '6:30 β 7:00 AM', 'meal': 'EARLY MORNING', 'hcolor':'F57F17', 'color': 'FFF8E1', 'kcal': '~50 kcal', 'options': [ ('A', 'Black coffee (no sugar) + 5 soaked almonds', 'P:2g C:2g F:5g'), ('B', 'Green tea (no sugar) + 5 cashews or peanuts', 'P:2g C:3g F:5g'), ('C', 'Warm lemon water + small handful peanuts', 'P:3g C:3g F:5g'), ] }, { 'time': '8:00 AM', 'meal': 'BREAKFAST', 'hcolor':'2E7D32', 'color': 'E8F5E9', 'kcal': '~300β350 kcal', 'options': [ ('A', '3 boiled or fried eggs + 2 slices toasted bread (any)', 'P:24g C:28g F:16g'), ('B', '2-egg omelette with onion, tomato, capsicum + 2 bread slices', 'P:22g C:30g F:14g'), ('C', '3 scrambled eggs + 1 cup cooked oats with banana', 'P:24g C:38g F:12g'), ('D', '2 eggs (any style) + 1 cup boiled rice + vegetables', 'P:18g C:40g F:10g'), ('E', 'Bread omelette (2 eggs + 2 bread slices, pan-fried lightly)', 'P:20g C:28g F:14g'), ] }, { 'time': '10:30 AM', 'meal': 'MID-MORNING SNACK', 'hcolor':'E65100', 'color': 'FFF3E0', 'kcal': '~100β120 kcal', 'options': [ ('A', '2 boiled eggs', 'P:12g C:1g F:10g'), ('B', '1 banana + 10 peanuts', 'P:5g C:27g F:5g'), ('C', '1 apple or any seasonal fruit', 'P:1g C:25g F:0g'), ('D', '1 cup plain curd (yoghurt) β no sugar', 'P:8g C:8g F:4g'), ] }, { 'time': '1:00 β 2:00 PM', 'meal': 'LUNCH', 'hcolor':'1565C0', 'color': 'E3F2FD', 'kcal': '~420β470 kcal', 'options': [ ('A', 'Grilled / boiled chicken (200g) + 1 cup rice + cucumber/tomato salad', 'P:46g C:40g F:8g'), ('B', 'Beef / mutton curry (150g) + 1 cup rice + salad', 'P:36g C:42g F:12g'), ('C', 'Grilled / fried fish (200g) + 1 cup rice + sliced vegetables', 'P:40g C:40g F:10g'), ('D', 'Prawns / shrimp (200g, any style) + 1 cup rice + salad', 'P:38g C:40g F:8g'), ('E', 'Chicken soup (thick) + 2 bread slices + boiled vegetables', 'P:34g C:32g F:8g'), ('F', 'Pork (150g, grilled or stewed) + 1 cup rice + cooked vegetables', 'P:36g C:40g F:12g'), ('G', '3-egg omelette (large) + 2 bread slices + sliced tomato + onion', 'P:24g C:30g F:16g'), ('H', 'RESTAURANT: Any grilled meat (200g) + rice (half plate) + salad', 'P:40g C:35g F:10g'), ] }, { 'time': '4:30 β 5:00 PM', 'meal': 'AFTERNOON SNACK', 'hcolor':'6A1B9A', 'color': 'F3E5F5', 'kcal': '~100β130 kcal', 'options': [ ('A', '2 boiled eggs', 'P:12g C:1g F:10g'), ('B', '1 cup plain curd with cucumber', 'P:8g C:8g F:4g'), ('C', 'Handful of peanuts or mixed nuts (25g)', 'P:6g C:5g F:14g'), ('D', '1 banana or any seasonal fruit', 'P:1g C:27g F:0g'), ] }, { 'time': '7:30 β 8:00 PM', 'meal': 'DINNER (Low-Carb)', 'hcolor':'283593', 'color': 'E8EAF6', 'kcal': '~350β400 kcal', 'options': [ ('A', 'Grilled / roasted chicken (200g) + stir-fried vegetables (any available)', 'P:44g C:12g F:12g'), ('B', 'Grilled / pan-fried fish (200g) + tomato-onion salad + lemon', 'P:40g C:8g F:10g'), ('C', 'Beef / pork stir-fry (150g) + mixed cooked vegetables, no rice', 'P:36g C:12g F:14g'), ('D', 'Prawn / shrimp (200g) + sauteed vegetables with garlic + 1 egg', 'P:42g C:10g F:10g'), ('E', 'Mutton / lamb (150g, grilled or boiled) + vegetable soup', 'P:36g C:10g F:14g'), ('F', '3-egg omelette + large plate of any cooked or raw vegetables', 'P:22g C:10g F:16g'), ('G', 'RESTAURANT: Grilled steak or chicken β ask for vegetables instead of fries', 'P:42g C:8g F:16g'), ('H', 'RESTAURANT: Grilled / roasted meat (any) + side salad or soup', 'P:38g C:10g F:14g'), ] }, ] for meal in meals: tbl = doc.add_table(rows=1 + len(meal['options']), cols=4) tbl.style = 'Table Grid' tbl.alignment = WD_TABLE_ALIGNMENT.CENTER widths = [Cm(2.6), Cm(1.2), Cm(10.2), Cm(3.2)] for row in tbl.rows: for i, cell in enumerate(row.cells): cell.width = widths[i] # Header row hdr = tbl.rows[0] for ci in range(4): set_cell_bg(hdr.cells[ci], meal['hcolor']) p0 = hdr.cells[0].paragraphs[0]; p0.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p0, meal['time'], size=7.5, color='FFFFFF') p1 = hdr.cells[1].paragraphs[0]; p1.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p1, meal['kcal'], size=7, color='FFFFFF') p2 = hdr.cells[2].paragraphs[0]; p2.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p2, meal['meal'], size=10, color='FFFFFF') p3 = hdr.cells[3].paragraphs[0]; p3.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p3, 'MACROS', size=8, color='FFFFFF') # Option rows for i, (opt, desc, macros) in enumerate(meal['options']): row = tbl.rows[i + 1] bg = meal['color'] if i % 2 == 0 else 'FAFAFA' for c in row.cells: set_cell_bg(c, bg) op = row.cells[0].paragraphs[0]; op.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(op, f'Option {opt}', size=8, color=meal['hcolor']) row.cells[1].paragraphs[0].add_run('') dp = row.cells[2].paragraphs[0] normal_run(dp, desc, size=8.5) mp = row.cells[3].paragraphs[0]; mp.alignment = WD_ALIGN_PARAGRAPH.CENTER normal_run(mp, macros, size=7.5, color='555555') doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # ALCOHOL NOTE (replacing smoking β confirmed he drinks) # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ add_section_header(doc, 'ALCOHOL GUIDANCE', 'B71C1C') alc_tbl = doc.add_table(rows=4, cols=2) alc_tbl.style = 'Table Grid' alc_data = [ ('Current habit', 'Regular alcohol consumption'), ('Problem', 'Alcohol adds 7 kcal/g (more than carbs). Even 2 drinks = 250β400 extra kcal. It also lowers fat burning for 24β48 hrs after drinking.'), ('Special risk', 'With Visceral Fat Rating of 18 and family history of diabetes, alcohol worsens insulin resistance and directly increases liver fat.'), ('Recommendation', 'Limit to 1β2 drinks MAXIMUM per week. On drinking days: choose spirits (whisky/vodka) with soda water over beer or cocktails. No drinking after 9 PM.'), ] alc_colors = ['FFCDD2', 'FFEBEE', 'FFEBEE', 'FFCDD2'] for i, (label, text) in enumerate(alc_data): set_cell_bg(alc_tbl.cell(i, 0), alc_colors[i]) set_cell_bg(alc_tbl.cell(i, 1), alc_colors[i]) p0 = alc_tbl.cell(i, 0).paragraphs[0] bold_run(p0, label, size=8.5, color='B71C1C') p1 = alc_tbl.cell(i, 1).paragraphs[0] normal_run(p1, text, size=8.5) doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # FLEXIBLE EATING OUT RULES # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ add_section_header(doc, 'EATING OUT β THE PLATE RULE (Use at Any Restaurant)', '006064') plate_p = doc.add_paragraph() plate_p.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(plate_p, 'HALF your plate = Vegetables / Salad | ' 'QUARTER = Protein (meat, eggs, fish) | ' 'QUARTER = Carbs (rice or 1 bread β not both)', size=9, color='004D40') doc.add_paragraph() swaps = [ ('Whole pizza', '2 slices only + side salad or soup', '~400 kcal saved'), ('Butter chicken + 2 naans', 'Butter chicken (small) + 1 bread only', '~350 kcal saved'), ('Pasta with cream sauce', 'Grilled chicken or fish + clear soup', '~300 kcal saved'), ('Biryani full plate', 'Half biryani + extra salad or raita', '~250 kcal saved'), ('Large portion fries', 'Ask for extra salad or boiled veg instead', '~300 kcal saved'), ('Soft drinks / juice', 'Plain water, lime soda (no sugar) or black coffee', '~150 kcal saved'), ('Beer (2 pints)', '1 pint max OR vodka/whisky + soda water', '~200 kcal saved'), ('Dessert after dinner', 'Black coffee or skip entirely', '~300 kcal saved'), ] swap_tbl = doc.add_table(rows=1 + len(swaps), cols=3) swap_tbl.style = 'Table Grid' for i, hdr_txt in enumerate(['INSTEAD OF', 'BETTER CHOICE', 'SAVING']): hc = swap_tbl.cell(0, i) set_cell_bg(hc, '006064') hp = hc.paragraphs[0]; hp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(hp, hdr_txt, size=8.5, color='FFFFFF') for i, (avoid, choose, saving) in enumerate(swaps): bg = 'E0F7FA' if i % 2 == 0 else 'FFFFFF' row = swap_tbl.rows[i + 1] for ci in range(3): set_cell_bg(row.cells[ci], bg) normal_run(row.cells[0].paragraphs[0], avoid, size=8.5) bold_run( row.cells[1].paragraphs[0], choose, size=8.5, color='00695C') rp = row.cells[2].paragraphs[0]; rp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(rp, saving, size=8, color='2E7D32') doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # DAILY RULES # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ add_section_header(doc, 'DAILY RULES', 'BF360C') rules = [ ('Eat dinner before 8 PM β nothing after 9 PM', 'Late eating stores fat more easily. Critical for reducing visceral fat (currently very high at 18).'), ('Drink 3 litres of water every day', 'Currently only 1-2L. Low water intake slows fat burning and increases hunger cravings.'), ('Replace morning orange juice with water or black coffee', 'OJ = liquid sugar, spikes blood sugar fast. Saves ~120 kcal every single day.'), ('Build every meal around protein first (meat / eggs / fish)', 'Protein keeps you full longest, protects muscle, and uses more energy to digest.'), ('Half your plate must be vegetables at every meal', 'Fill up on low-calorie, high-fibre foods before eating the rest β reduces total intake naturally.'), ('Sleep by 11 PM β no exceptions', 'Your metabolic age is 64 (you are 53). Late sleep raises cortisol and directly causes belly fat accumulation.'), ('Limit alcohol to 1-2 drinks per week maximum', 'Alcohol blocks fat burning for 24-48 hrs. With your family history of diabetes, this is a serious risk factor.'), ('Keep gym at 5-6 times per week', 'Your muscle mass (61.9 kg) is your biggest asset. Resistance training must continue throughout weight loss.'), ('Get fasting blood glucose and HbA1c tested', 'Both parents have diabetes. Visceral fat of 18 + family history = high pre-diabetic risk. Test now.'), ] rules_tbl = doc.add_table(rows=len(rules), cols=2) rules_tbl.style = 'Table Grid' for i, (rule, reason) in enumerate(rules): bg = 'FBE9E7' if i % 2 == 0 else 'FFFFFF' rc0 = rules_tbl.cell(i, 0); rc1 = rules_tbl.cell(i, 1) set_cell_bg(rc0, bg); set_cell_bg(rc1, bg) rc0.width = Cm(8); rc1.width = Cm(9.2) bold_run(rc0.paragraphs[0], rule, size=8.5, color='BF360C') normal_run(rc1.paragraphs[0], reason, size=8) doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # WEIGHT MILESTONES # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ add_section_header(doc, 'WEIGHT LOSS MILESTONES', '37474F') miles = [ ('Short Term', 'Lose 5 kg', '89.9 kg', '6β8 weeks'), ('Mid Term', 'Lose 10 kg', '84.9 kg', '3β4 months'), ('GOAL β ', 'Lose 18.1 kg','76.8 kg', '6β9 months'), ] m_tbl = doc.add_table(rows=1 + len(miles), cols=4) m_tbl.style = 'Table Grid' for i, h in enumerate(['STAGE', 'LOSS TARGET', 'BODY WEIGHT', 'TIMELINE']): hc = m_tbl.cell(0, i) set_cell_bg(hc, '37474F') hp = hc.paragraphs[0]; hp.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(hp, h, size=8.5, color='FFFFFF') m_colors = ['ECEFF1', 'CFD8DC', 'B0BEC5'] for i, (goal, loss, weight, time) in enumerate(miles): row = m_tbl.rows[i + 1] for ci in range(4): set_cell_bg(row.cells[ci], m_colors[i]) for ci, txt in enumerate([goal, loss, weight, time]): p = row.cells[ci].paragraphs[0] p.alignment = WD_ALIGN_PARAGRAPH.CENTER bold_run(p, txt, size=9, color='1A237E' if i == 2 else '263238') doc.add_paragraph() # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # FOOTER # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ footer_p = doc.add_paragraph() footer_p.alignment = WD_ALIGN_PARAGRAPH.CENTER normal_run(footer_p, 'Prepared by Kolors Health Care | Date: 25 July 2026 | Client: Kevin Richard | ' 'Counsellor: Hajira | Next review in 4 weeks.', size=7.5, color='888888') # ββ Save ββββββββββββββββββββββββββββββββββββββββββββββββββββββ out = '/tmp/workspace/kevin-diet/Kevin_Richard_Diet_Chart_v2.docx' doc.save(out) print(f"Saved: {out}") PYEOF python3 /tmp/workspace/kevin-diet/create_diet_chart_v2.py
ls -lh /tmp/workspace/kevin-diet/
Kevin Richard Diet Chart v2
Word Document Β· DOCX
| Issue | Fixed |
|---|---|
| Smoked salmon, turkey rashers, asparagus, Greek yoghurt, soba noodles, etc. | Replaced with eggs, boiled/grilled chicken, fish, rice, bread, curd, peanuts, bananas, seasonal fruit - all universally available |
| Smoking mentioned in rules | Removed completely |
| Alcohol not addressed | Full dedicated section added - explains why alcohol blocks fat burning for 24-48 hrs, the diabetes risk given his family history, and gives a clear limit of 1-2 drinks per week with guidance on choosing spirits over beer |
| Overly specific restaurant names and niche items | All restaurant options now say "any grilled meat + rice/salad" β works anywhere in the world |
Meal prep and diet charts
What do you need for meal prep and diet charts? Β· Does Kevin cook at home at all, or is this purely for when he does cook?
cat > /tmp/workspace/kevin-diet/create_mealprep_chart.py << 'PYEOF' from docx import Document from docx.shared import Pt, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT from docx.oxml.ns import qn from docx.oxml import OxmlElement doc = Document() # ββ Margins ββββββββββββββββββββββββββββββββββββββββββββββββββββ section = doc.sections[0] section.page_width = Cm(21) section.page_height = Cm(29.7) section.left_margin = Cm(1.4) section.right_margin = Cm(1.4) section.top_margin = Cm(1.4) section.bottom_margin = Cm(1.4) doc.styles['Normal'].font.name = 'Arial' doc.styles['Normal'].font.size = Pt(9) # ββ Helpers βββββββββββββββββββββββββββββββββββββββββββββββββββββ def set_bg(cell, hex_color): tc = cell._tc; tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'),'clear'); shd.set(qn('w:color'),'auto'); shd.set(qn('w:fill'), hex_color) tcPr.append(shd) def shade_para(para, hex_color): pPr = para._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'),'clear'); shd.set(qn('w:color'),'auto'); shd.set(qn('w:fill'), hex_color) pPr.append(shd) def brun(para, text, size=None, color=None): r = para.add_run(text); r.bold = True if size: r.font.size = Pt(size) if color: r.font.color.rgb = RGBColor(*bytes.fromhex(color)) return r def nrun(para, text, size=None, color=None): r = para.add_run(text) if size: r.font.size = Pt(size) if color: r.font.color.rgb = RGBColor(*bytes.fromhex(color)) return r def section_header(doc, text, bg): p = doc.add_paragraph() brun(p, f' {text}', size=11, color='FFFFFF') p.alignment = WD_ALIGN_PARAGRAPH.LEFT shade_para(p, bg) def spacer(doc): doc.add_paragraph().paragraph_format.space_after = Pt(2) # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # PAGE 1 β HEADER + MACRO BAR + 7-DAY DIET CHART # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # ββ Header ββββββββββββββββββββββββββββββββββββββββββββββββββββ ht = doc.add_table(rows=1, cols=2) ht.style = 'Table Grid'; ht.alignment = WD_TABLE_ALIGNMENT.CENTER lc = ht.cell(0,0); rc = ht.cell(0,1) set_bg(lc,'1B5E20'); set_bg(rc,'F9FBE7') lp = lc.paragraphs[0]; lp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(lp,'KOLORS HEALTH CARE', size=13, color='FFFFFF') lp2 = lc.add_paragraph('Slimming & Wellness Program') lp2.alignment = WD_ALIGN_PARAGRAPH.CENTER lp2.runs[0].font.color.rgb = RGBColor(0xC8,0xE6,0xC9); lp2.runs[0].font.size = Pt(9) rp = rc.paragraphs[0]; rp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(rp,'7-DAY DIET CHART + MEAL PREP GUIDE', size=11, color='1B5E20') info = [('Client','Kevin Richard'),('Age/Sex','53 yrs | Male'), ('Start Weight','94.9 kg | BMI 30.6 | Visceral Fat: 18 (HIGH)'), ('Target','76.8 kg (lose 18.1 kg of fat)'), ('Calorie Target','1800β1900 kcal/day | Protein: 140β150 g/day'), ('Date','25 July 2026 | Counsellor: Hajira')] for label, val in info: dp = rc.add_paragraph(); dp.alignment = WD_ALIGN_PARAGRAPH.LEFT brun(dp, f'{label}: ', size=8.5, color='33691E'); nrun(dp, val, size=8.5) spacer(doc) # ββ Macro Bar βββββββββββββββββββββββββββββββββββββββββββββββββ mt = doc.add_table(rows=2, cols=5) mt.style = 'Table Grid'; mt.alignment = WD_TABLE_ALIGNMENT.CENTER hm = ['CALORIES','PROTEIN','CARBS','FAT','WATER'] vm = ['1800β1900 kcal','140β150 g','150β170 g','55β65 g','3+ litres'] cm = ['1565C0','558B2F','E65100','6A1B9A','00838F'] for i,(h,v,c) in enumerate(zip(hm,vm,cm)): hc = mt.cell(0,i); vc = mt.cell(1,i) set_bg(hc,c); set_bg(vc,'F5F5F5') hp = hc.paragraphs[0]; hp.alignment = WD_ALIGN_PARAGRAPH.CENTER; brun(hp,h,size=8,color='FFFFFF') vp = vc.paragraphs[0]; vp.alignment = WD_ALIGN_PARAGRAPH.CENTER; brun(vp,v,size=9,color=c) spacer(doc) # ββ 7-Day Diet Chart ββββββββββββββββββββββββββββββββββββββββββ section_header(doc,'7-DAY DIET CHART (H = Home Cook | R = Restaurant / Takeaway)','1565C0') DAYS = ['MON','TUE','WED','THU','FRI','SAT','SUN'] TAG = ['H','H','H','R','R','H','R'] # H=home, R=restaurant # Each day: [early_morn, breakfast, mid_snack, lunch, aft_snack, dinner] + kcal chart = [ # MON β home ['Black coffee + 5 almonds', '3 boiled eggs + 2 toast slices + sliced tomato', '1 banana + 10 peanuts', 'Grilled chicken (200g) + 1 cup rice + cucumber salad', '2 boiled eggs', 'Grilled chicken (200g) + stir-fried mixed vegetables', '~1820'], # TUE β home ['Green tea + 5 cashews', '2-egg omelette (onion, tomato, capsicum) + 2 toast slices', '1 cup curd (no sugar)', 'Grilled / fried fish (200g) + 1 cup rice + salad', 'Handful peanuts (25g)', 'Pan-fried fish (200g) + sautΓ©ed vegetables', '~1800'], # WED β home ['Black coffee + 5 almonds', '3 scrambled eggs + 1 cup oats + 1 banana', '2 boiled eggs', 'Beef / mutton curry (150g) + 1 cup rice + salad', '1 apple', 'Beef stir-fry (150g) + cooked vegetables β no rice', '~1850'], # THU β restaurant ['Lemon water + 5 almonds', 'Bread omelette (2 eggs + 2 bread) at cafΓ©', '1 fruit (any seasonal)', 'RESTAURANT: Grilled meat (200g) + rice (half) + salad', '1 cup curd', 'RESTAURANT: Grilled chicken/fish + side vegetables (no fries)', '~1830'], # FRI β restaurant ['Black coffee (no sugar)', 'Eggs (any style) + 2 bread at cafΓ© or hotel', '2 boiled eggs or handful nuts', 'RESTAURANT: Any grilled protein + half rice + salad', '1 banana', 'RESTAURANT: Grilled steak / chicken + salad β skip chips', '~1810'], # SAT β home ['Green tea + 5 peanuts', '3 boiled eggs + 2 toast + sliced tomato & onion', '1 cup curd with cucumber', 'Prawns / shrimp (200g) + 1 cup rice + salad', 'Handful peanuts', 'Grilled prawns (200g) + sautΓ©ed vegetables β no rice', '~1840'], # SUN β restaurant/flex ['Black coffee + 5 almonds', '2-egg omelette + 2 toast (home or cafΓ©)', '1 fruit (any)', 'RESTAURANT: Grilled fish + rice (half plate) + vegetables', '2 boiled eggs', 'RESTAURANT / Home: Any grilled meat + vegetable soup', '~1800'], ] meal_labels = ['Early Morning\n6:30β7 AM','Breakfast\n8 AM', 'Mid-Morning\n10:30 AM','Lunch\n1β2 PM', 'Snack\n4:30 PM','Dinner\n7:30β8 PM','~kcal'] col_widths = [Cm(1.5),Cm(2.7),Cm(2.7),Cm(2.0),Cm(3.4),Cm(1.8),Cm(3.4),Cm(1.7)] tbl = doc.add_table(rows=8, cols=8) tbl.style = 'Table Grid'; tbl.alignment = WD_TABLE_ALIGNMENT.CENTER # Set widths for row in tbl.rows: for i,cell in enumerate(row.cells): cell.width = col_widths[i] # Header row hdr_row = tbl.rows[0] set_bg(hdr_row.cells[0],'263238') hp = hdr_row.cells[0].paragraphs[0]; hp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(hp,'DAY',size=8,color='FFFFFF') for i, lbl in enumerate(meal_labels): cell = hdr_row.cells[i+1] set_bg(cell,'37474F') p = cell.paragraphs[0]; p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, lbl, size=7.5, color='FFFFFF') # Day rows day_colors = ['E3F2FD','E8F5E9','FFF8E1','E8EAF6','FFF3E0','E0F7FA','F3E5F5'] day_label_colors = ['1565C0','2E7D32','F57F17','283593','E65100','006064','6A1B9A'] for d, (day, tag, row_data, dc, dlc) in enumerate( zip(DAYS, TAG, chart, day_colors, day_label_colors)): row = tbl.rows[d+1] # Day cell dc_cell = row.cells[0] set_bg(dc_cell, dlc) dp = dc_cell.paragraphs[0]; dp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(dp, f'{day}\n({tag})', size=8, color='FFFFFF') # Meal cells for i, meal_text in enumerate(row_data): cell = row.cells[i+1] set_bg(cell, day_colors[d]) p = cell.paragraphs[0] p.alignment = WD_ALIGN_PARAGRAPH.LEFT is_kcal = (i == 6) if is_kcal: p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, meal_text, size=9, color=dlc) elif meal_text.startswith('RESTAURANT'): nrun(p, meal_text, size=7.5, color='B71C1C') else: nrun(p, meal_text, size=7.5) spacer(doc) # ββ Legend ββββββββββββββββββββββββββββββββββββββββββββββββββββ leg_p = doc.add_paragraph() leg_p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(leg_p,'H = Home cooked | ', size=8, color='2E7D32') brun(leg_p,'R = Restaurant / Takeaway | ', size=8, color='B71C1C') nrun(leg_p,'Rate of loss: 0.5β1 kg/week | Safe & sustainable', size=8, color='555555') spacer(doc) # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # PAGE 2 β WEEKLY MEAL PREP GUIDE # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ doc.add_page_break() # Header bar p = doc.add_paragraph() brun(p,' WEEKLY MEAL PREP GUIDE β Kevin Richard | Kolors Health Care', size=12, color='FFFFFF') p.alignment = WD_ALIGN_PARAGRAPH.CENTER shade_para(p,'1B5E20') spacer(doc) # ββ Intro box βββββββββββββββββββββββββββββββββββββββββββββββββ intro_p = doc.add_paragraph() nrun(intro_p, 'Since Kevin eats out most of the time, this guide covers weekend batch prep for the 2-3 home cook days. ' 'Spending 45-60 minutes on Sunday prepping proteins, boiling eggs and washing vegetables means home meals ' 'take under 10 minutes to assemble on weekdays. All ingredients are basic and available anywhere.', size=9, color='1B5E20') shade_para(intro_p,'E8F5E9') spacer(doc) # ββ Shopping List βββββββββββββββββββββββββββββββββββββββββββββ section_header(doc,'WEEKLY SHOPPING LIST (For 3 home-cook days)','33691E') shop_tbl = doc.add_table(rows=1, cols=3) shop_tbl.style = 'Table Grid'; shop_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER shop_cats = [ ('PROTEINS', [ 'Eggs β 1.5 dozen (18 eggs)', 'Chicken breast or thighs β 600g', 'Fish (any fresh/frozen) β 400g', 'Beef / mutton β 300g (optional)', 'Prawns / shrimp β 300g (optional)', ]), ('CARBS & STAPLES', [ 'Rice β 1 kg bag', 'Bread (any loaf) β 1 loaf', 'Oats β 200g', 'Peanuts β 200g packet', 'Almonds or cashews β 100g', ]), ('VEGETABLES & FRUIT', [ 'Tomatoes β 6 pcs', 'Cucumbers β 4 pcs', 'Onions β 4 pcs', 'Capsicum / Bell pepper β 3 pcs', 'Any leafy greens (spinach, cabbage) β 1 bunch', 'Bananas β 6 pcs', 'Any seasonal fruit β 4β6 pcs', 'Curd / Yoghurt β 500g tub', ]), ] for i,(cat_name, items) in enumerate(shop_cats): cell = shop_tbl.cell(0, i) set_bg(cell,'E8F5E9') p = cell.paragraphs[0] brun(p, f'{cat_name}\n', size=9, color='1B5E20') for item in items: ip = cell.add_paragraph(f' β’ {item}') ip.runs[0].font.size = Pt(8.5) cell.add_paragraph() small = cell.add_paragraph('Also keep: salt, pepper, garlic, cooking oil, lemon') small.runs[0].font.size = Pt(8); small.runs[0].font.color.rgb = RGBColor(0x77,0x77,0x77) small.runs[0].italic = True spacer(doc) # ββ Sunday Prep Steps βββββββββββββββββββββββββββββββββββββββββ section_header(doc,'SUNDAY BATCH PREP (45β60 minutes β sets up the whole week)','E65100') prep_steps = [ ('STEP 1 | 10 mins', 'Boil 8β10 eggs', 'Hard-boil a batch of eggs. Store in fridge with shells on. They last 7 days. ' 'Use for breakfast, mid-morning snack, and afternoon snack throughout the week β no cooking needed.'), ('STEP 2 | 15 mins', 'Cook chicken in bulk', 'Season 600g chicken (breast or thighs) with salt, pepper, garlic. ' 'Grill or boil until fully cooked. Slice or shred. Store in a sealed container in the fridge. ' 'Keeps 4 days. Use for Mon, Tue, Wed lunches and dinners β just reheat in a pan with vegetables.'), ('STEP 3 | 10 mins', 'Cook a pot of rice', 'Cook 2 cups of raw rice (yields ~4 cups cooked). Store in fridge. ' 'Reheat in microwave or pan with a splash of water. Use for MonβWed lunches. ' 'Do not add butter or oil β season with salt only.'), ('STEP 4 | 10 mins', 'Wash and chop vegetables', 'Wash and chop tomatoes, cucumber, onion, capsicum. Store in separate containers or zip bags. ' 'Ready-to-use for salads, omelettes, and stir-fries all week β no chopping needed on busy mornings.'), ('STEP 5 | 5 mins', 'Marinate fish or beef (optional)', 'If planning a fish or beef dinner mid-week, marinate 400g in salt, pepper, lemon, garlic. ' 'Store in fridge. Cook fresh on the day β takes 8 minutes to pan-fry.'), ('STEP 6 | 5 mins', 'Portion snacks', 'Divide peanuts/almonds into small portions (25g each) in small bags or cups. ' 'Means no measuring or overeating β just grab and go.'), ] for step_label, step_title, step_desc in prep_steps: pt = doc.add_table(rows=1, cols=2) pt.style = 'Table Grid'; pt.alignment = WD_TABLE_ALIGNMENT.CENTER lc = pt.cell(0,0); rc = pt.cell(0,1) lc.width = Cm(4); rc.width = Cm(13.2) set_bg(lc,'FBE9E7'); set_bg(rc,'FFFFFF') lp = lc.paragraphs[0]; lp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(lp, step_label, size=8, color='BF360C') lc.add_paragraph() lp2 = lc.add_paragraph(); lp2.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(lp2, step_title, size=9, color='BF360C') rp = rc.paragraphs[0] nrun(rp, step_desc, size=8.5) spacer(doc) spacer(doc) # ββ Quick Assembly Guide ββββββββββββββββββββββββββββββββββββββ section_header(doc,'QUICK MEAL ASSEMBLY (Using Prepped Ingredients)','006064') assembly = [ ('Breakfast (5 min)', 'Take 2β3 pre-boiled eggs from fridge. Pop bread in toaster. Slice pre-washed tomato and onion. Done.', 'OR: Beat 2 eggs + pre-chopped capsicum/onion β omelette in 4 mins.'), ('Lunch (8 min)', 'Scoop pre-cooked rice into bowl. Reheat pre-cooked chicken in pan (3 mins) with a dash of oil and seasoning. ' 'Add pre-washed cucumber and tomato on the side. Done.', 'OR: Heat beef/fish with onion in pan (8 mins) + rice + salad.'), ('Dinner (10 min)', 'Take 200g chicken/fish from fridge. Pan-fry on high heat 4β5 mins each side. ' 'Toss pre-chopped vegetables in same pan for 3 mins. Season with salt, pepper, garlic. No rice.', 'OR: 3-egg omelette + large portion raw salad (cucumber, tomato, onion) β ready in 6 mins.'), ('Snack (0 min)', 'Grab a pre-portioned bag of peanuts/almonds. OR take 1β2 pre-boiled eggs from fridge. ' 'OR slice a banana. No prep needed.', ''), ] asm_tbl = doc.add_table(rows=1 + len(assembly), cols=3) asm_tbl.style = 'Table Grid'; asm_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER for i, h in enumerate(['MEAL','PRIMARY METHOD','ALTERNATIVE']): hc = asm_tbl.cell(0,i); set_bg(hc,'006064') hp = hc.paragraphs[0]; hp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(hp, h, size=8.5, color='FFFFFF') asm_colors = ['E0F7FA','FFFFFF','E0F7FA','FFFFFF'] for i,(meal,method,alt) in enumerate(assembly): row = asm_tbl.rows[i+1] bg = asm_colors[i] for ci in range(3): set_bg(row.cells[ci], bg) brun(row.cells[0].paragraphs[0], meal, size=8.5, color='006064') nrun(row.cells[1].paragraphs[0], method, size=8) nrun(row.cells[2].paragraphs[0], alt, size=8, color='555555') spacer(doc) # ββ Fridge Storage Guide ββββββββββββββββββββββββββββββββββββββ section_header(doc,'FRIDGE STORAGE QUICK REFERENCE','37474F') storage_tbl = doc.add_table(rows=1, cols=4) storage_tbl.style = 'Table Grid'; storage_tbl.alignment = WD_TABLE_ALIGNMENT.CENTER for i,h in enumerate(['ITEM','HOW TO STORE','LASTS','USE FOR']): hc = storage_tbl.cell(0,i); set_bg(hc,'37474F') hp = hc.paragraphs[0]; hp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(hp,h,size=8.5,color='FFFFFF') storage_tbl.add_row() storage_tbl.add_row() storage_data = [ ('Boiled eggs', 'Shell on, in bowl or tray', '7 days', 'Breakfast / snacks'), ('Cooked chicken', 'Sealed container, no sauce', '4 days', 'Lunch + dinner MonβWed'), ('Cooked rice', 'Sealed container, cooled first', '4 days', 'Lunch MonβWed'), ('Raw fish / beef', 'In marinade, covered', '2 days', 'Cook fresh on the day'), ('Chopped vegetables', 'Separate containers / zip bags', '4 days', 'All meals β salad + stir-fry'), ('Portioned nuts', 'Small bags / cups, room temp is OK', '2 weeks', 'Snacks'), ('Curd / yoghurt', 'Sealed original tub', '5β7 days','Snack + with lunch'), ] st_tbl2 = doc.add_table(rows=1 + len(storage_data), cols=4) st_tbl2.style = 'Table Grid' for i,h in enumerate(['ITEM','HOW TO STORE','LASTS','USE FOR']): hc = st_tbl2.cell(0,i); set_bg(hc,'37474F') hp = hc.paragraphs[0]; hp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(hp,h,size=8.5,color='FFFFFF') for i,(item,how,lasts,use) in enumerate(storage_data): bg = 'ECEFF1' if i%2==0 else 'FFFFFF' row = st_tbl2.rows[i+1] for ci in range(4): set_bg(row.cells[ci],bg) brun(row.cells[0].paragraphs[0], item, size=8.5, color='263238') nrun(row.cells[1].paragraphs[0], how, size=8) p = row.cells[2].paragraphs[0]; p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, lasts, size=8.5, color='2E7D32') nrun(row.cells[3].paragraphs[0], use, size=8) spacer(doc) # ββ Alcohol Rule ββββββββββββββββββββββββββββββββββββββββββββββ section_header(doc,'ALCOHOL β WEEKLY RULE','B71C1C') alc_p = doc.add_paragraph() shade_para(alc_p,'FFEBEE') brun(alc_p,'Limit: 1β2 drinks maximum per week. ', size=9, color='B71C1C') nrun(alc_p, 'Alcohol blocks fat burning for 24β48 hrs after drinking. ' 'On drinking days choose spirits (whisky / vodka + soda water) over beer or cocktails. ' 'Never drink after 9 PM. Plan drinking on Friday or Saturday β not before gym days.', size=8.5) spacer(doc) # ββ Footer ββββββββββββββββββββββββββββββββββββββββββββββββββββ fp = doc.add_paragraph() fp.alignment = WD_ALIGN_PARAGRAPH.CENTER nrun(fp, 'Kolors Health Care | Client: Kevin Richard | Date: 25 July 2026 | ' 'Counsellor: Hajira | Next review: 4 weeks | Target: 76.8 kg', size=7.5, color='888888') # ββ Save ββββββββββββββββββββββββββββββββββββββββββββββββββββββ out = '/tmp/workspace/kevin-diet/Kevin_Richard_MealPrep_DietChart.docx' doc.save(out) print(f'Saved: {out}') PYEOF python3 /tmp/workspace/kevin-diet/create_mealprep_chart.py
ls -lh /tmp/workspace/kevin-diet/Kevin_Richard_MealPrep_DietChart.docx
Kevin Richard MealPrep DietChart
Word Document Β· DOCX
| Section | Content |
|---|---|
| Shopping list | 3 columns - proteins, carbs/staples, vegetables/fruit - exactly what to buy for 3 home days |
| Sunday batch prep | 6 steps, timed (45-60 min total) - boil eggs, cook chicken in bulk, cook rice, chop veg, marinate, portion snacks |
| Quick assembly guide | How to turn prepped ingredients into a meal in 5-10 minutes |
| Fridge storage | What to store, how, and how long each item lasts |
| Alcohol rule | 1-2 drinks/week max, spirit over beer, never after 9 PM |
Just give me diet chart for 7 days printable
cat > /tmp/workspace/kevin-diet/create_7day_chart.py << 'PYEOF' from docx import Document from docx.shared import Pt, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT from docx.oxml.ns import qn from docx.oxml import OxmlElement doc = Document() section = doc.sections[0] section.page_width = Cm(29.7) # A4 landscape section.page_height = Cm(21) section.left_margin = Cm(1.2) section.right_margin = Cm(1.2) section.top_margin = Cm(1.2) section.bottom_margin = Cm(1.2) section.orientation = 1 # landscape doc.styles['Normal'].font.name = 'Arial' doc.styles['Normal'].font.size = Pt(9) def set_bg(cell, hex_color): tc = cell._tc; tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'),'clear'); shd.set(qn('w:color'),'auto'); shd.set(qn('w:fill'), hex_color) tcPr.append(shd) def shade_para(para, hex_color): pPr = para._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'),'clear'); shd.set(qn('w:color'),'auto'); shd.set(qn('w:fill'), hex_color) pPr.append(shd) def brun(para, text, size=None, color=None): r = para.add_run(text); r.bold = True if size: r.font.size = Pt(size) if color: r.font.color.rgb = RGBColor(*bytes.fromhex(color)) return r def nrun(para, text, size=None, color=None): r = para.add_run(text) if size: r.font.size = Pt(size) if color: r.font.color.rgb = RGBColor(*bytes.fromhex(color)) return r # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # HEADER # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ht = doc.add_table(rows=1, cols=3) ht.style = 'Table Grid'; ht.alignment = WD_TABLE_ALIGNMENT.CENTER lc = ht.cell(0,0); mc = ht.cell(0,1); rc = ht.cell(0,2) set_bg(lc,'1B5E20'); set_bg(mc,'FFFFFF'); set_bg(rc,'1B5E20') lc.width = Cm(5); mc.width = Cm(17.3); rc.width = Cm(4.7) # Left β clinic lp = lc.paragraphs[0]; lp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(lp,'KOLORS\nHEALTH CARE', size=12, color='FFFFFF') lc.add_paragraph() lp2 = lc.add_paragraph('Slimming & Wellness') lp2.alignment = WD_ALIGN_PARAGRAPH.CENTER lp2.runs[0].font.size = Pt(8); lp2.runs[0].font.color.rgb = RGBColor(0xC8,0xE6,0xC9) # Middle β title + client details mp = mc.paragraphs[0]; mp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(mp,'7-DAY PERSONALISED DIET CHART', size=14, color='1B5E20') details = [ ('Client','Kevin Richard'), ('Age / Sex','53 yrs | Male'), ('Weight','94.9 kg | BMI: 30.6 | Fat: 31.2% | Visceral Fat: 18 (HIGH)'), ('Target','76.8 kg | Lose 18.1 kg of fat | Rate: 0.5β1 kg/week'), ('Calories','1800β1900 kcal/day | Protein: 140β150g | Water: 3+ litres/day'), ('Date','25 July 2026 | Counsellor: Hajira | Next Review: 4 weeks'), ] for label, val in details: dp = mc.add_paragraph(); dp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(dp, f'{label}: ', size=8.5, color='33691E') nrun(dp, val, size=8.5) # Right β rules summary rp = rc.paragraphs[0]; rp.alignment = WD_ALIGN_PARAGRAPH.LEFT brun(rp,'KEY RULES', size=9, color='FFFFFF') rules_short = [ 'Dinner before 8 PM', 'Nothing after 9 PM', 'Drink 3L water daily', 'No OJ β black coffee', 'Half plate = veggies', 'Gym 5β6Γ/week', 'Alcohol: max 2/week', 'Sleep by 11 PM', ] for rule in rules_short: rpp = rc.add_paragraph(f' β’ {rule}') rpp.runs[0].font.size = Pt(8) rpp.runs[0].font.color.rgb = RGBColor(0xC8,0xE6,0xC9) doc.add_paragraph().paragraph_format.space_after = Pt(3) # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # 7-DAY CHART TABLE # meal columns: Early Morning | Breakfast | Mid-Morning | Lunch | Snack | Dinner | kcal # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ DAYS = ['MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY'] # Each row: [early_morn, breakfast, mid_morn, lunch, snack, dinner, kcal] chart = [ # MONDAY ['Black coffee\n(no sugar)\n+ 5 almonds', '3 boiled eggs\n+ 2 toast slices\n+ sliced tomato & onion', '1 banana\n+ 10 peanuts', 'Grilled chicken (200g)\n+ 1 cup rice\n+ cucumber & tomato salad', '2 boiled eggs', 'Grilled chicken (200g)\n+ stir-fried mixed vegetables\n(no rice)', '~1820\nkcal'], # TUESDAY ['Green tea\n(no sugar)\n+ 5 cashews', '2-egg omelette\n(onion, tomato, capsicum)\n+ 2 toast slices', '1 cup plain curd\n(no sugar)', 'Grilled / fried fish (200g)\n+ 1 cup rice\n+ side salad', 'Handful peanuts\n(25g)', 'Pan-fried fish (200g)\n+ sautΓ©ed vegetables\n(no rice)', '~1800\nkcal'], # WEDNESDAY ['Black coffee\n(no sugar)\n+ 5 almonds', '3 scrambled eggs\n+ 1 cup oats\n+ 1 banana', '2 boiled eggs', 'Beef / mutton curry (150g)\n+ 1 cup rice\n+ salad', '1 apple or\nseasonal fruit', 'Beef stir-fry (150g)\n+ cooked vegetables\n(no rice)', '~1850\nkcal'], # THURSDAY ['Lemon water\n+ 5 almonds', 'Bread omelette\n(2 eggs + 2 bread slices)\npan-fried lightly', '1 cup curd\nwith cucumber', 'Prawns / shrimp (200g)\n+ 1 cup rice\n+ salad', '2 boiled eggs\nor handful nuts', 'Grilled prawns (200g)\n+ sautΓ©ed vegetables\n(no rice)', '~1830\nkcal'], # FRIDAY ['Black coffee\n(no sugar)\n+ 5 peanuts', '3 boiled eggs\n+ 2 toast slices\n+ tomato & onion', '1 banana', 'RESTAURANT:\nGrilled meat (200g)\n+ half plate rice + salad', '1 cup curd or\n1 seasonal fruit', 'RESTAURANT:\nGrilled chicken or fish\n+ vegetables (no fries)', '~1810\nkcal'], # SATURDAY ['Green tea\n(no sugar)\n+ 5 almonds', '3 boiled eggs\n+ 2 toast slices\n+ sliced tomato', '1 cup curd\nwith cucumber', 'Grilled chicken (200g)\n+ 1 cup rice\n+ salad', 'Handful peanuts\n(25g)', 'RESTAURANT:\nGrilled steak / chicken\n+ salad (skip fries)', '~1840\nkcal'], # SUNDAY ['Black coffee\n(no sugar)\n+ 5 cashews', '2-egg omelette\n+ 2 toast slices\n+ tomato & onion', '1 apple or\nseasonal fruit', 'RESTAURANT:\nGrilled fish or chicken\n+ half rice + salad', '2 boiled eggs', 'RESTAURANT:\nAny grilled meat\n+ vegetable soup / salad', '~1800\nkcal'], ] # Meal column headers + colours meal_hdrs = [ ('EARLY MORNING\n6:30 β 7:00 AM', 'F57F17', 'FFF8E1'), ('BREAKFAST\n8:00 AM', '2E7D32', 'E8F5E9'), ('MID-MORNING\n10:30 AM', 'BF360C', 'FBE9E7'), ('LUNCH\n1:00 β 2:00 PM', '1565C0', 'E3F2FD'), ('SNACK\n4:30 β 5:00 PM', '6A1B9A', 'F3E5F5'), ('DINNER\n7:30 β 8:00 PM', '283593', 'E8EAF6'), ('TOTAL\nKCAL', '37474F', 'ECEFF1'), ] day_colors = [ ('1565C0','E3F2FD'), # Mon ('2E7D32','E8F5E9'), # Tue ('F57F17','FFF8E1'), # Wed ('6A1B9A','F3E5F5'), # Thu ('BF360C','FBE9E7'), # Fri ('006064','E0F7FA'), # Sat ('37474F','ECEFF1'), # Sun ] # Table: 8 rows (1 header + 7 days), 8 cols (day label + 7 meal cols) tbl = doc.add_table(rows=8, cols=8) tbl.style = 'Table Grid' tbl.alignment = WD_TABLE_ALIGNMENT.CENTER # Column widths col_w = [Cm(2.2), Cm(3.1), Cm(3.4), Cm(2.9), Cm(3.7), Cm(2.9), Cm(3.7), Cm(1.5)] for row in tbl.rows: for i, cell in enumerate(row.cells): cell.width = col_w[i] # Header row hdr = tbl.rows[0] set_bg(hdr.cells[0],'1B5E20') hp0 = hdr.cells[0].paragraphs[0]; hp0.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(hp0,'DAY', size=9, color='FFFFFF') for i,(hdr_txt, hdr_col, _) in enumerate(meal_hdrs): cell = hdr.cells[i+1] set_bg(cell, hdr_col) p = cell.paragraphs[0]; p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, hdr_txt, size=8, color='FFFFFF') # Day rows for d in range(7): row = tbl.rows[d+1] day_txt_col, day_bg_col = day_colors[d] # Day label cell dc = row.cells[0] set_bg(dc, day_txt_col) dp = dc.paragraphs[0]; dp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(dp, DAYS[d], size=9, color='FFFFFF') # Meal cells for m in range(7): cell = row.cells[m+1] _, meal_bg = meal_hdrs[m] # Alternate between meal colour and white for readability use_bg = meal_bg if d % 2 == 0 else 'FFFFFF' set_bg(cell, use_bg) p = cell.paragraphs[0]; p.alignment = WD_ALIGN_PARAGRAPH.LEFT text = chart[d][m] if m == 6: # kcal column p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, text, size=9, color=day_txt_col) elif 'RESTAURANT' in text: p.alignment = WD_ALIGN_PARAGRAPH.LEFT lines = text.split('\n') brun(p, lines[0]+'\n', size=8, color='B71C1C') nrun(p, '\n'.join(lines[1:]), size=8, color='B71C1C') else: nrun(p, text, size=8) doc.add_paragraph().paragraph_format.space_after = Pt(2) # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ # FOOTER BAR # ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ ft = doc.add_table(rows=1, cols=4) ft.style = 'Table Grid'; ft.alignment = WD_TABLE_ALIGNMENT.CENTER ft_data = [ ('RESTAURANT DAYS: Fri, Sat, Sun', 'B71C1C', 'FFEBEE'), ('HOME COOK DAYS: Mon, Tue, Wed, Thu', '2E7D32', 'E8F5E9'), ('ALCOHOL: Max 2 drinks/week β spirits over beer β never after 9 PM', '6A1B9A', 'F3E5F5'), ('Kolors Health Care | Kevin Richard | 25 July 2026 | Counsellor: Hajira', '37474F', 'FAFAFA'), ] for i,(txt,col,bg) in enumerate(ft_data): cell = ft.cell(0,i); set_bg(cell, bg) p = cell.paragraphs[0]; p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, txt, size=7.5, color=col) out = '/tmp/workspace/kevin-diet/Kevin_Richard_7Day_DietChart.docx' doc.save(out) print(f'Saved: {out}') PYEOF python3 /tmp/workspace/kevin-diet/create_7day_chart.py
~/kevin-diet/create_7day_chart.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/kevin-diet/create_7day_chart.py'
python3 /tmp/workspace/kevin-diet/create_7day_chart.py
Kevin Richard 7Day DietChart
Word Document Β· DOCX
No need to mention home and restaurant separately one standard is fine
cat > /tmp/workspace/kevin-diet/create_7day_v2.py << 'PYEOF' from docx import Document from docx.shared import Pt, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT from docx.oxml.ns import qn from docx.oxml import OxmlElement doc = Document() section = doc.sections[0] section.page_width = Cm(29.7) section.page_height = Cm(21) section.left_margin = Cm(1.2) section.right_margin = Cm(1.2) section.top_margin = Cm(1.2) section.bottom_margin = Cm(1.2) section.orientation = 1 doc.styles['Normal'].font.name = 'Arial' doc.styles['Normal'].font.size = Pt(9) def set_bg(cell, hex_color): tc = cell._tc; tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'),'clear'); shd.set(qn('w:color'),'auto'); shd.set(qn('w:fill'), hex_color) tcPr.append(shd) def shade_para(para, hex_color): pPr = para._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'),'clear'); shd.set(qn('w:color'),'auto'); shd.set(qn('w:fill'), hex_color) pPr.append(shd) def brun(para, text, size=None, color=None): r = para.add_run(text); r.bold = True if size: r.font.size = Pt(size) if color: r.font.color.rgb = RGBColor(*bytes.fromhex(color)) return r def nrun(para, text, size=None, color=None): r = para.add_run(text) if size: r.font.size = Pt(size) if color: r.font.color.rgb = RGBColor(*bytes.fromhex(color)) return r # ββ HEADER ββββββββββββββββββββββββββββββββββββββββββββββββββββ ht = doc.add_table(rows=1, cols=3) ht.style = 'Table Grid'; ht.alignment = WD_TABLE_ALIGNMENT.CENTER lc = ht.cell(0,0); mc = ht.cell(0,1); rc = ht.cell(0,2) set_bg(lc,'1B5E20'); set_bg(mc,'FFFFFF'); set_bg(rc,'1B5E20') lc.width = Cm(4.5); mc.width = Cm(18.3); rc.width = Cm(4.2) lp = lc.paragraphs[0]; lp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(lp,'KOLORS\nHEALTH CARE', size=12, color='FFFFFF') lp2 = lc.add_paragraph('Slimming & Wellness') lp2.alignment = WD_ALIGN_PARAGRAPH.CENTER lp2.runs[0].font.size = Pt(8) lp2.runs[0].font.color.rgb = RGBColor(0xC8,0xE6,0xC9) mp = mc.paragraphs[0]; mp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(mp,'7-DAY PERSONALISED DIET CHART', size=14, color='1B5E20') info = [ ('Client','Kevin Richard'), ('Age / Sex','53 yrs | Male'), ('Weight','94.9 kg | BMI: 30.6 | Body Fat: 31.2% | Visceral Fat Rating: 18 (HIGH)'), ('Target','76.8 kg | Fat to lose: 18.1 kg | Rate: 0.5β1 kg/week'), ('Daily Target','1800β1900 kcal | Protein: 140β150 g | Water: 3+ litres/day'), ('Date','25 July 2026 | Counsellor: Hajira | Next Review: 4 weeks'), ] for label, val in info: dp = mc.add_paragraph(); dp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(dp, f'{label}: ', size=8.5, color='33691E') nrun(dp, val, size=8.5) rp = rc.paragraphs[0]; rp.alignment = WD_ALIGN_PARAGRAPH.LEFT brun(rp,'DAILY RULES', size=9, color='FFFFFF') rules_short = [ 'β’ Dinner before 8 PM', 'β’ No food after 9 PM', 'β’ Drink 3L water daily', 'β’ No OJ β use black coffee', 'β’ Half plate = vegetables', 'β’ Gym 5β6Γ per week', 'β’ Alcohol: max 2/week', 'β’ Sleep by 11 PM', ] for rule in rules_short: rpp = rc.add_paragraph(rule) rpp.runs[0].font.size = Pt(8) rpp.runs[0].font.color.rgb = RGBColor(0xC8,0xE6,0xC9) doc.add_paragraph().paragraph_format.space_after = Pt(2) # ββ 7-DAY TABLE βββββββββββββββββββββββββββββββββββββββββββββββ DAYS = ['MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY'] # Meal columns: header text, header bg, row bg (even), row bg (odd) meal_hdrs = [ ('EARLY MORNING\n6:30 β 7:00 AM', 'F57F17', 'FFF8E1', 'FFFDE7'), ('BREAKFAST\n8:00 AM', '2E7D32', 'E8F5E9', 'F1F8E9'), ('MID-MORNING\n10:30 AM', 'BF360C', 'FBE9E7', 'FFF3E0'), ('LUNCH\n1:00 β 2:00 PM', '1565C0', 'E3F2FD', 'E8EAF6'), ('SNACK\n4:30 β 5:00 PM', '6A1B9A', 'F3E5F5', 'EDE7F6'), ('DINNER\n7:30 β 8:00 PM', '283593', 'E8EAF6', 'E3F2FD'), ('~KCAL', '37474F', 'ECEFF1', 'F5F5F5'), ] day_label_colors = ['0D47A1','1B5E20','E65100','4A148C','B71C1C','006064','37474F'] # One consistent meal plan β no home/restaurant distinction chart = [ # MONDAY ['Black coffee\n(no sugar)\n+ 5 almonds', '3 boiled eggs\n+ 2 toast slices\n+ sliced tomato & onion', '1 banana\n+ 10 peanuts', 'Grilled chicken (200g)\n+ 1 cup rice\n+ cucumber & tomato salad', '2 boiled eggs', 'Grilled chicken (200g)\n+ stir-fried vegetables\n(no rice)', '~1820'], # TUESDAY ['Green tea\n(no sugar)\n+ 5 cashews', '2-egg omelette\n(onion, tomato, capsicum)\n+ 2 toast slices', '1 cup plain curd\n(no sugar)', 'Grilled / fried fish (200g)\n+ 1 cup rice\n+ side salad', 'Handful peanuts\n(25g)', 'Pan-fried fish (200g)\n+ sautΓ©ed vegetables\n(no rice)', '~1800'], # WEDNESDAY ['Black coffee\n(no sugar)\n+ 5 almonds', '3 scrambled eggs\n+ 1 cup oats\n+ 1 banana', '2 boiled eggs', 'Beef / mutton (150g)\n+ 1 cup rice\n+ salad', '1 apple or\nseasonal fruit', 'Beef / mutton stir-fry (150g)\n+ cooked vegetables\n(no rice)', '~1850'], # THURSDAY ['Lemon water\n+ 5 almonds', 'Bread omelette\n(2 eggs + 2 bread slices)', '1 cup curd\nwith cucumber', 'Prawns / shrimp (200g)\n+ 1 cup rice\n+ salad', '2 boiled eggs', 'Grilled prawns (200g)\n+ sautΓ©ed vegetables\n(no rice)', '~1830'], # FRIDAY ['Black coffee\n(no sugar)\n+ 5 peanuts', '3 boiled eggs\n+ 2 toast slices\n+ tomato & onion', '1 banana', 'Grilled chicken (200g)\n+ 1 cup rice\n+ cucumber salad', '1 cup curd or\nseasonal fruit', 'Grilled fish (200g)\n+ stir-fried vegetables\n(no rice)', '~1810'], # SATURDAY ['Green tea\n(no sugar)\n+ 5 almonds', '3 boiled eggs\n+ 2 toast slices\n+ sliced tomato', '1 cup curd\nwith cucumber', 'Pork / chicken (200g)\n+ 1 cup rice\n+ salad', 'Handful peanuts\n(25g)', 'Grilled pork / chicken (200g)\n+ cooked vegetables\n(no rice)', '~1840'], # SUNDAY ['Black coffee\n(no sugar)\n+ 5 cashews', '2-egg omelette\n+ 2 toast slices\n+ tomato & onion', '1 apple or\nseasonal fruit', 'Grilled fish (200g)\n+ 1 cup rice\n+ salad', '2 boiled eggs', 'Any grilled meat (200g)\n+ vegetable soup\nor side salad', '~1800'], ] tbl = doc.add_table(rows=8, cols=8) tbl.style = 'Table Grid' tbl.alignment = WD_TABLE_ALIGNMENT.CENTER col_w = [Cm(2.0), Cm(3.0), Cm(3.5), Cm(2.8), Cm(3.8), Cm(2.8), Cm(3.8), Cm(1.4)] for row in tbl.rows: for i, cell in enumerate(row.cells): cell.width = col_w[i] # Header row hdr = tbl.rows[0] set_bg(hdr.cells[0],'1B5E20') hp0 = hdr.cells[0].paragraphs[0]; hp0.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(hp0,'DAY', size=9, color='FFFFFF') for i,(hdr_txt, hdr_col, _, __) in enumerate(meal_hdrs): cell = hdr.cells[i+1] set_bg(cell, hdr_col) p = cell.paragraphs[0]; p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, hdr_txt, size=8, color='FFFFFF') # Day rows for d in range(7): row = tbl.rows[d+1] # Day label dc = row.cells[0] set_bg(dc, day_label_colors[d]) dp = dc.paragraphs[0]; dp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(dp, DAYS[d], size=9, color='FFFFFF') # Meal cells for m in range(7): cell = row.cells[m+1] _, _, bg_even, bg_odd = meal_hdrs[m] set_bg(cell, bg_even if d % 2 == 0 else bg_odd) p = cell.paragraphs[0] text = chart[d][m] if m == 6: # kcal p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, text, size=10, color=day_label_colors[d]) else: p.alignment = WD_ALIGN_PARAGRAPH.LEFT nrun(p, text, size=8) doc.add_paragraph().paragraph_format.space_after = Pt(2) # ββ FOOTER ββββββββββββββββββββββββββββββββββββββββββββββββββββ fp = doc.add_paragraph() fp.alignment = WD_ALIGN_PARAGRAPH.CENTER shade_para(fp,'1B5E20') brun(fp,' Kolors Health Care | Client: Kevin Richard | Date: 25 July 2026 | ' 'Counsellor: Hajira | Target: 76.8 kg | Next Review: 4 weeks ', size=8, color='FFFFFF') out = '/tmp/workspace/kevin-diet/Kevin_Richard_7Day_DietChart_v2.docx' doc.save(out) print(f'Saved: {out}') PYEOF python3 /tmp/workspace/kevin-diet/create_7day_v2.py
Kevin Richard 7Day DietChart v2
Word Document Β· DOCX
This diet has no variety at all where is whole wheat chapathi and all
cat > /tmp/workspace/kevin-diet/create_7day_v3.py << 'PYEOF' from docx import Document from docx.shared import Pt, RGBColor, Cm from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT from docx.oxml.ns import qn from docx.oxml import OxmlElement doc = Document() section = doc.sections[0] section.page_width = Cm(29.7) section.page_height = Cm(21) section.left_margin = Cm(1.2) section.right_margin = Cm(1.2) section.top_margin = Cm(1.2) section.bottom_margin = Cm(1.2) section.orientation = 1 doc.styles['Normal'].font.name = 'Arial' doc.styles['Normal'].font.size = Pt(9) def set_bg(cell, hex_color): tc = cell._tc; tcPr = tc.get_or_add_tcPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'),'clear'); shd.set(qn('w:color'),'auto'); shd.set(qn('w:fill'), hex_color) tcPr.append(shd) def shade_para(para, hex_color): pPr = para._p.get_or_add_pPr() shd = OxmlElement('w:shd') shd.set(qn('w:val'),'clear'); shd.set(qn('w:color'),'auto'); shd.set(qn('w:fill'), hex_color) pPr.append(shd) def brun(para, text, size=None, color=None): r = para.add_run(text); r.bold = True if size: r.font.size = Pt(size) if color: r.font.color.rgb = RGBColor(*bytes.fromhex(color)) return r def nrun(para, text, size=None, color=None): r = para.add_run(text) if size: r.font.size = Pt(size) if color: r.font.color.rgb = RGBColor(*bytes.fromhex(color)) return r # ββ HEADER ββββββββββββββββββββββββββββββββββββββββββββββββββββ ht = doc.add_table(rows=1, cols=3) ht.style = 'Table Grid'; ht.alignment = WD_TABLE_ALIGNMENT.CENTER lc = ht.cell(0,0); mc = ht.cell(0,1); rc = ht.cell(0,2) set_bg(lc,'1B5E20'); set_bg(mc,'FFFFFF'); set_bg(rc,'1B5E20') lc.width = Cm(4.5); mc.width = Cm(18.3); rc.width = Cm(4.2) lp = lc.paragraphs[0]; lp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(lp,'KOLORS\nHEALTH CARE', size=12, color='FFFFFF') lp2 = lc.add_paragraph('Slimming & Wellness') lp2.alignment = WD_ALIGN_PARAGRAPH.CENTER lp2.runs[0].font.size = Pt(8) lp2.runs[0].font.color.rgb = RGBColor(0xC8,0xE6,0xC9) mp = mc.paragraphs[0]; mp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(mp,'7-DAY PERSONALISED DIET CHART', size=14, color='1B5E20') info = [ ('Client','Kevin Richard'), ('Age / Sex','53 yrs | Male'), ('Weight','94.9 kg | BMI: 30.6 | Body Fat: 31.2% | Visceral Fat Rating: 18 (HIGH)'), ('Target','76.8 kg | Fat to lose: 18.1 kg | Rate: 0.5β1 kg/week'), ('Daily Target','1800β1900 kcal | Protein: 140β150 g | Water: 3+ litres/day'), ('Date','25 July 2026 | Counsellor: Hajira | Next Review: 4 weeks'), ] for label, val in info: dp = mc.add_paragraph(); dp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(dp, f'{label}: ', size=8.5, color='33691E') nrun(dp, val, size=8.5) rp = rc.paragraphs[0]; rp.alignment = WD_ALIGN_PARAGRAPH.LEFT brun(rp,'DAILY RULES', size=9, color='FFFFFF') rules_short = [ 'β’ Dinner before 8 PM', 'β’ No food after 9 PM', 'β’ Drink 3L water daily', 'β’ No OJ β black coffee', 'β’ Half plate = vegetables', 'β’ Gym 5β6Γ per week', 'β’ Alcohol: max 2/week', 'β’ Sleep by 11 PM', ] for rule in rules_short: rpp = rc.add_paragraph(rule) rpp.runs[0].font.size = Pt(8) rpp.runs[0].font.color.rgb = RGBColor(0xC8,0xE6,0xC9) doc.add_paragraph().paragraph_format.space_after = Pt(2) # ββ MEAL COLUMN DEFINITIONS βββββββββββββββββββββββββββββββββββ meal_hdrs = [ ('EARLY MORNING\n6:30 β 7:00 AM', 'F57F17', 'FFF8E1', 'FFFDE7'), ('BREAKFAST\n8:00 AM', '2E7D32', 'E8F5E9', 'F1F8E9'), ('MID-MORNING\n10:30 AM', 'BF360C', 'FBE9E7', 'FFF3E0'), ('LUNCH\n1:00 β 2:00 PM', '1565C0', 'E3F2FD', 'E8EAF6'), ('SNACK\n4:30 β 5:00 PM', '6A1B9A', 'F3E5F5', 'EDE7F6'), ('DINNER\n7:30 β 8:00 PM', '283593', 'E8EAF6', 'E3F2FD'), ('~KCAL', '37474F', 'ECEFF1', 'F5F5F5'), ] day_label_colors = ['0D47A1','1B5E20','E65100','4A148C','B71C1C','006064','37474F'] DAYS = ['MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY'] # ββ 7-DAY PLAN WITH FULL VARIETY βββββββββββββββββββββββββββββ # Carb rotation: rice / chapati (whole wheat) / bread / oats / brown rice / pasta / potato # Protein rotation: chicken / fish / beef / mutton / prawns / pork / eggs # Each day is different in breakfast, carb source, protein, and cooking style chart = [ # MONDAY β eggs + rice + chicken ['Black coffee\n(no sugar)\n+ 5 almonds', '3 boiled eggs\n+ 2 whole wheat\ntoast slices\n+ sliced tomato', '1 banana\n+ 10 peanuts', 'Grilled chicken (200g)\n+ 1 cup white / brown rice\n+ cucumber & tomato salad', '2 boiled eggs', 'Grilled chicken (200g)\n+ stir-fried vegetables\n(no rice)', '~1820'], # TUESDAY β oats + chapati + fish ['Green tea\n(no sugar)\n+ 5 almonds', '1 cup oats (cooked)\n+ 1 boiled egg\n+ 1 banana', '1 cup plain curd\n(no sugar)', 'Grilled / fried fish (200g)\n+ 2 whole wheat chapati\n+ onion tomato salad', 'Handful peanuts\n(25g)', 'Pan-fried fish (200g)\n+ 2 whole wheat chapati\n+ stir-fried vegetables', '~1810'], # WEDNESDAY β egg omelette + brown rice + beef / mutton ['Black coffee\n(no sugar)\n+ 5 cashews', '2-egg omelette\n(onion, tomato, capsicum)\n+ 2 whole wheat\ntoast slices', '2 boiled eggs', 'Beef / mutton curry (150g)\n+ 1 cup brown rice\n+ side salad', '1 apple or\nseasonal fruit', 'Beef / mutton stir-fry (150g)\n+ 2 whole wheat chapati\n+ sautΓ©ed vegetables', '~1850'], # THURSDAY β oats + chapati + prawns ['Lemon water\n+ 5 almonds', '1 cup oats (cooked)\n+ 2 boiled eggs\n+ 1 fruit', '1 cup curd\n+ cucumber slices', 'Prawns / shrimp (200g)\n+ 2 whole wheat chapati\n+ tomato & onion salad', '2 boiled eggs', 'Grilled prawns (200g)\n+ 1 cup brown rice\n+ sautΓ©ed vegetables', '~1830'], # FRIDAY β scrambled eggs + chapati + chicken ['Black coffee\n(no sugar)\n+ 5 peanuts', '3 scrambled eggs\n+ 2 whole wheat chapati\n+ sliced tomato & onion', '1 banana', 'Grilled chicken (200g)\n+ 1 cup rice\n+ cucumber salad', '1 cup plain curd\nor seasonal fruit', 'Chicken stew / curry (200g)\n+ 2 whole wheat chapati\n+ salad', '~1820'], # SATURDAY β bread omelette + rice + pork / chicken ['Green tea\n(no sugar)\n+ 5 almonds', 'Bread omelette\n(2 eggs + 2 whole wheat\nbread slices)', '1 cup curd\n+ cucumber', 'Pork / chicken (200g)\n+ 1 cup white rice\n+ salad', 'Handful peanuts\n(25g)', 'Grilled pork / chicken (200g)\n+ 2 whole wheat chapati\n+ cooked vegetables', '~1840'], # SUNDAY β eggs + variety carb + fish or any meat ['Black coffee\n(no sugar)\n+ 5 cashews', '1 cup oats\n+ 1 boiled egg\n+ 1 banana', '1 apple or\nseasonal fruit', 'Grilled fish / any meat (200g)\n+ 1 cup rice or\n2 whole wheat chapati\n+ salad', '2 boiled eggs', 'Any grilled meat (200g)\n+ 2 whole wheat chapati\n+ vegetable soup / salad', '~1800'], ] # ββ BUILD TABLE βββββββββββββββββββββββββββββββββββββββββββββββ tbl = doc.add_table(rows=8, cols=8) tbl.style = 'Table Grid' tbl.alignment = WD_TABLE_ALIGNMENT.CENTER col_w = [Cm(2.0), Cm(2.9), Cm(3.5), Cm(2.8), Cm(3.8), Cm(2.7), Cm(3.8), Cm(1.5)] for row in tbl.rows: for i, cell in enumerate(row.cells): cell.width = col_w[i] # Header row hdr = tbl.rows[0] set_bg(hdr.cells[0],'1B5E20') hp0 = hdr.cells[0].paragraphs[0]; hp0.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(hp0,'DAY', size=9, color='FFFFFF') for i,(hdr_txt, hdr_col, _, __) in enumerate(meal_hdrs): cell = hdr.cells[i+1] set_bg(cell, hdr_col) p = cell.paragraphs[0]; p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, hdr_txt, size=8, color='FFFFFF') # Day rows for d in range(7): row = tbl.rows[d+1] dc = row.cells[0] set_bg(dc, day_label_colors[d]) dp = dc.paragraphs[0]; dp.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(dp, DAYS[d], size=9, color='FFFFFF') for m in range(7): cell = row.cells[m+1] _, _, bg_even, bg_odd = meal_hdrs[m] set_bg(cell, bg_even if d % 2 == 0 else bg_odd) p = cell.paragraphs[0] text = chart[d][m] if m == 6: p.alignment = WD_ALIGN_PARAGRAPH.CENTER brun(p, text, size=10, color=day_label_colors[d]) else: p.alignment = WD_ALIGN_PARAGRAPH.LEFT nrun(p, text, size=8) doc.add_paragraph().paragraph_format.space_after = Pt(2) # ββ VARIETY NOTE ββββββββββββββββββββββββββββββββββββββββββββββ vp = doc.add_paragraph() vp.alignment = WD_ALIGN_PARAGRAPH.CENTER shade_para(vp,'E8F5E9') brun(vp,' CARB VARIETY ACROSS THE WEEK: ', size=8, color='1B5E20') nrun(vp,'White rice | Brown rice | Whole wheat chapati | Whole wheat bread / toast | Oats β rotate freely based on availability. ', size=8, color='33691E') brun(vp,' PROTEIN VARIETY: ', size=8, color='1B5E20') nrun(vp,'Chicken | Fish | Beef | Mutton | Prawns | Pork | Eggs β swap any protein on any day.', size=8, color='33691E') # ββ FOOTER ββββββββββββββββββββββββββββββββββββββββββββββββββββ fp = doc.add_paragraph() fp.alignment = WD_ALIGN_PARAGRAPH.CENTER shade_para(fp,'1B5E20') brun(fp,' Kolors Health Care | Client: Kevin Richard | Date: 25 July 2026 | ' 'Counsellor: Hajira | Target: 76.8 kg | Next Review: 4 weeks ', size=8, color='FFFFFF') out = '/tmp/workspace/kevin-diet/Kevin_Richard_7Day_DietChart_v3.docx' doc.save(out) print(f'Saved: {out}') PYEOF python3 /tmp/workspace/kevin-diet/create_7day_v3.py
Kevin Richard 7Day DietChart v3
Word Document Β· DOCX
| Breakfast | Carb at Lunch/Dinner | Protein | |
|---|---|---|---|
| Mon | Boiled eggs + whole wheat toast | White / brown rice | Chicken |
| Tue | Oats + boiled egg + banana | Whole wheat chapati | Fish |
| Wed | Omelette + whole wheat toast | Brown rice + chapati | Beef / Mutton |
| Thu | Oats + 2 eggs + fruit | Chapati + brown rice | Prawns |
| Fri | Scrambled eggs + chapati | Rice | Chicken |
| Sat | Bread omelette | Rice + chapati | Pork / Chicken |
| Sun | Oats + egg + fruit | Rice or chapati | Any meat / Fish |
Give professional printable diet chart
And calories around 1600 weight loss 2kg per week
cat > /tmp/workspace/kevin-diet/create_professional_chart.py << 'PYEOF' from reportlab.lib.pagesizes import A4, landscape from reportlab.lib import colors from reportlab.lib.units import cm, mm from reportlab.platypus import (SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer, HRFlowable) from reportlab.lib.styles import ParagraphStyle from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT from reportlab.platypus import KeepTogether PAGE = landscape(A4) W, H = PAGE # ββ Colour palette ββββββββββββββββββββββββββββββββββββββββββββ GREEN_DARK = colors.HexColor('#1B5E20') GREEN_MED = colors.HexColor('#2E7D32') GREEN_LIGHT = colors.HexColor('#E8F5E9') GREEN_PALE = colors.HexColor('#F1F8E9') AMBER = colors.HexColor('#F57F17') AMBER_PALE = colors.HexColor('#FFF8E1') AMBER_PALE2 = colors.HexColor('#FFFDE7') RED_DARK = colors.HexColor('#B71C1C') RED_MED = colors.HexColor('#BF360C') RED_PALE = colors.HexColor('#FBE9E7') RED_PALE2 = colors.HexColor('#FFF3E0') BLUE_DARK = colors.HexColor('#0D47A1') BLUE_MED = colors.HexColor('#1565C0') BLUE_PALE = colors.HexColor('#E3F2FD') BLUE_PALE2 = colors.HexColor('#E8EAF6') PURPLE_DARK = colors.HexColor('#4A148C') PURPLE_MED = colors.HexColor('#6A1B9A') PURPLE_PALE = colors.HexColor('#F3E5F5') PURPLE_PALE2 = colors.HexColor('#EDE7F6') NAVY = colors.HexColor('#283593') NAVY_PALE = colors.HexColor('#E8EAF6') NAVY_PALE2 = colors.HexColor('#E3F2FD') TEAL_DARK = colors.HexColor('#006064') TEAL_PALE = colors.HexColor('#E0F7FA') TEAL_PALE2 = colors.HexColor('#B2EBF2') SLATE = colors.HexColor('#37474F') SLATE_PALE = colors.HexColor('#ECEFF1') SLATE_PALE2 = colors.HexColor('#F5F5F5') WHITE = colors.white GREY_TEXT = colors.HexColor('#546E7A') GOLD = colors.HexColor('#F9A825') day_hdr_colors = [BLUE_DARK, GREEN_MED, RED_MED, PURPLE_DARK, RED_DARK, TEAL_DARK, SLATE] day_pale = [BLUE_PALE, GREEN_LIGHT, RED_PALE, PURPLE_PALE, RED_PALE, TEAL_PALE, SLATE_PALE] # ββ Styles ββββββββββββββββββββββββββββββββββββββββββββββββββββ def S(name, **kw): return ParagraphStyle(name, **kw) sNorm = S('N', fontName='Helvetica', fontSize=8, leading=10, textColor=colors.HexColor('#212121')) sBold = S('B', fontName='Helvetica-Bold', fontSize=8, leading=10, textColor=colors.HexColor('#212121')) sMeal = S('M', fontName='Helvetica', fontSize=7.5, leading=9.5, textColor=colors.HexColor('#212121')) sMealB = S('MB', fontName='Helvetica-Bold', fontSize=7.5, leading=9.5, textColor=colors.HexColor('#212121')) sHdr = S('H', fontName='Helvetica-Bold', fontSize=8, leading=10, textColor=WHITE, alignment=TA_CENTER) sDay = S('D', fontName='Helvetica-Bold', fontSize=9, leading=11, textColor=WHITE, alignment=TA_CENTER) sKcal = S('K', fontName='Helvetica-Bold', fontSize=10, leading=12, alignment=TA_CENTER) sTtl = S('T', fontName='Helvetica-Bold', fontSize=16, leading=20, textColor=GREEN_DARK, alignment=TA_CENTER) sSub = S('S', fontName='Helvetica', fontSize=8.5, leading=11, textColor=GREY_TEXT, alignment=TA_CENTER) sRule = S('R', fontName='Helvetica', fontSize=7.5, leading=10, textColor=WHITE) sRuleB = S('RB', fontName='Helvetica-Bold', fontSize=7.5, leading=10, textColor=WHITE) sNote = S('No', fontName='Helvetica', fontSize=7, leading=9, textColor=GREY_TEXT, alignment=TA_CENTER) sFooter= S('F', fontName='Helvetica', fontSize=7.5, leading=10, textColor=WHITE, alignment=TA_CENTER) sWarn = S('W', fontName='Helvetica-Bold', fontSize=7.5, leading=10, textColor=RED_DARK, alignment=TA_CENTER) def cell(txt, style=sMeal, color=None): if color: style = ParagraphStyle('tmp', parent=style, textColor=color) return Paragraph(txt.replace('\n','<br/>'), style) def hcell(txt, style=sHdr): return Paragraph(txt.replace('\n','<br/>'), style) # ββ 7-Day meal data @ ~1600 kcal ββββββββββββββββββββββββββββ # Each: [early_morn, breakfast, mid_morn, lunch, snack, dinner, kcal_str] # Targets: ~1600 kcal | Protein 130-140g | Carbs 120-140g | Fat 45-55g chart = [ # MON β chicken + rice + chapati ['Black coffee\n(no sugar)\n+ 5 almonds', '2 boiled eggs\n+ 1 whole wheat\ntoast slice\n+ sliced tomato', '1 small banana\n(approx. 80g)', 'Grilled chicken (180g)\n+ Β½ cup brown rice\n+ cucumber &\ntomato salad', '1 cup plain curd\n(no sugar)', 'Grilled chicken (150g)\n+ 2 whole wheat chapati\n+ stir-fried vegetables', '~1590\nkcal\nP:138g\nC:125g\nF:48g'], # TUE β fish + chapati + oats ['Green tea\n(no sugar)\n+ 5 almonds', '1 cup oats\n(cooked, no sugar)\n+ 1 boiled egg\n+ Β½ banana', '2 boiled eggs', 'Grilled fish (200g)\n+ 2 whole wheat\nchapati\n+ onion tomato salad', 'Handful peanuts\n(20g)', 'Pan-fried fish (180g)\n+ sautΓ©ed vegetables\n(spinach, capsicum,\nonion) β no rice', '~1600\nkcal\nP:142g\nC:118g\nF:47g'], # WED β beef/mutton + brown rice + chapati ['Lemon water\n+ 5 almonds', '2-egg omelette\n(onion + tomato\n+ capsicum)\n+ 1 whole wheat\ntoast slice', '1 apple or\nseasonal fruit\n(medium)', 'Beef / mutton (130g)\n+ Β½ cup brown rice\n+ salad', '1 cup plain curd\n+ cucumber slices', 'Beef / mutton\nstir-fry (130g)\n+ 2 whole wheat\nchapati\n+ vegetables', '~1610\nkcal\nP:130g\nC:130g\nF:50g'], # THU β prawns + chapati + oats ['Black coffee\n(no sugar)\n+ 5 cashews', '1 cup oats\n(cooked)\n+ 2 boiled eggs\n+ Β½ banana', '1 cup plain curd\n+ cucumber', 'Prawns / shrimp\n(180g)\n+ 2 whole wheat\nchapati\n+ salad', '1 seasonal fruit\n(medium)', 'Grilled prawns (180g)\n+ Β½ cup brown rice\n+ sautΓ©ed vegetables\nβ low oil', '~1595\nkcal\nP:136g\nC:122g\nF:46g'], # FRI β chicken + chapati (both meals) ['Green tea\n(no sugar)\n+ 5 peanuts', '2 scrambled eggs\n+ 2 whole wheat\nchapati\n+ sliced tomato\n& onion', '2 boiled eggs', 'Grilled chicken\n(180g)\n+ Β½ cup white rice\n+ cucumber salad', 'Handful peanuts\n(20g)', 'Chicken curry /\nstew (150g)\n+ 2 whole wheat\nchapati\n+ salad', '~1605\nkcal\nP:140g\nC:124g\nF:48g'], # SAT β pork/chicken + rice + bread ['Black coffee\n(no sugar)\n+ 5 almonds', 'Bread omelette\n(2 eggs +\n1 whole wheat\nbread slice)', '1 cup plain curd\n+ fruit (small)', 'Pork / chicken\n(180g)\n+ Β½ cup brown rice\n+ onion &\ntomato salad', '1 apple or\nseasonal fruit', 'Grilled pork /\nchicken (150g)\n+ 2 whole wheat\nchapati\n+ cooked\nvegetables', '~1600\nkcal\nP:135g\nC:126g\nF:49g'], # SUN β any meat + flex carb ['Lemon water\n+ 5 cashews', '1 cup oats\n+ 1 boiled egg\n+ Β½ banana', '1 seasonal fruit\n(medium)', 'Any grilled meat\n(180g)\n+ Β½ cup rice OR\n2 whole wheat\nchapati + salad', '2 boiled eggs', 'Any grilled meat\n(150g)\n+ 2 whole wheat\nchapati\n+ vegetable\nsoup / salad', '~1590\nkcal\nP:132g\nC:120g\nF:48g'], ] DAYS = ['MONDAY','TUESDAY','WEDNESDAY','THURSDAY','FRIDAY','SATURDAY','SUNDAY'] MEAL_H = ['EARLY MORNING\n6:30β7:00 AM','BREAKFAST\n8:00 AM', 'MID-MORNING\n10:30 AM','LUNCH\n1:00β2:00 PM', 'SNACK\n4:30β5:00 PM','DINNER\n7:30β8:00 PM','KCAL /\nMACROS'] MEAL_COLORS_HDR = [AMBER, GREEN_MED, RED_MED, BLUE_MED, PURPLE_MED, NAVY, SLATE] MEAL_COLORS_EVEN = [AMBER_PALE, GREEN_LIGHT, RED_PALE, BLUE_PALE, PURPLE_PALE, NAVY_PALE, SLATE_PALE] MEAL_COLORS_ODD = [AMBER_PALE2, GREEN_PALE, RED_PALE2, BLUE_PALE2, PURPLE_PALE2, NAVY_PALE2, SLATE_PALE2] # ββ Column widths (landscape A4 usable β 25.3 cm) βββββββββββββ # day | em | bf | mm | ln | sn | dn | kc CW = [1.85*cm, 3.0*cm, 3.6*cm, 2.7*cm, 3.85*cm, 2.7*cm, 3.85*cm, 1.75*cm] # ββ Build table rows ββββββββββββββββββββββββββββββββββββββββββ def meal_para(txt, even, col_i): bg = MEAL_COLORS_EVEN[col_i] if even else MEAL_COLORS_ODD[col_i] return (Paragraph(txt.replace('\n','<br/>'), sMeal), bg) rows = [] # Header row hdr_row = [hcell('DAY')] for mh, mc in zip(MEAL_H, MEAL_COLORS_HDR): hdr_row.append(hcell(mh)) rows.append(hdr_row) # Day rows for d_i, (day, meals) in enumerate(zip(DAYS, chart)): row = [Paragraph(day, sDay)] for m_i, meal_txt in enumerate(meals): if m_i == 6: # macros col kcal_color = day_hdr_colors[d_i] row.append(Paragraph(meal_txt.replace('\n','<br/>'), ParagraphStyle('kc', parent=sKcal, textColor=kcal_color, fontSize=8, leading=10))) else: row.append(Paragraph(meal_txt.replace('\n','<br/>'), sMeal)) rows.append(row) # ββ TableStyle ββββββββββββββββββββββββββββββββββββββββββββββββ style_cmds = [ ('FONTNAME', (0,0),(-1,0), 'Helvetica-Bold'), ('FONTSIZE', (0,0),(-1,0), 8), ('TEXTCOLOR', (0,0),(-1,0), WHITE), ('ALIGN', (0,0),(-1,-1),'CENTER'), ('VALIGN', (0,0),(-1,-1),'MIDDLE'), ('ROWBACKGROUNDS', (0,0), (0,-1), day_hdr_colors), # day col ('GRID', (0,0),(-1,-1), 0.4, colors.HexColor('#CFD8DC')), ('LINEABOVE', (0,0),(-1,0), 1.2, GREEN_DARK), ('LINEBELOW', (0,-1),(-1,-1), 1.2, GREEN_DARK), ('TOPPADDING', (0,0),(-1,-1), 4), ('BOTTOMPADDING',(0,0),(-1,-1), 4), ('LEFTPADDING', (0,0),(-1,-1), 4), ('RIGHTPADDING',(0,0),(-1,-1), 4), ] # Meal column header backgrounds for ci, mc in enumerate(MEAL_COLORS_HDR): style_cmds.append(('BACKGROUND', (ci+1, 0), (ci+1, 0), mc)) # Alternating row backgrounds per meal column for d_i in range(7): row_i = d_i + 1 for m_i in range(7): col_i = m_i + 1 bg = MEAL_COLORS_EVEN[m_i] if d_i % 2 == 0 else MEAL_COLORS_ODD[m_i] style_cmds.append(('BACKGROUND', (col_i, row_i), (col_i, row_i), bg)) table = Table(rows, colWidths=CW, repeatRows=1) table.setStyle(TableStyle(style_cmds)) # ββ Document ββββββββββββββββββββββββββββββββββββββββββββββββββ out = '/tmp/workspace/kevin-diet/Kevin_Richard_Professional_DietChart.pdf' doc_obj = SimpleDocTemplate( out, pagesize=PAGE, leftMargin=1.2*cm, rightMargin=1.2*cm, topMargin=1.2*cm, bottomMargin=1.2*cm, title='Kolors Health Care β Diet Chart β Kevin Richard' ) story = [] # ββ HEADER BLOCK ββββββββββββββββββββββββββββββββββββββββββββββ header_data = [[ Paragraph('<b><font color="white" size="13">KOLORS<br/>HEALTH CARE</font></b><br/>' '<font color="#C8E6C9" size="8">Slimming & Wellness Program</font>', ParagraphStyle('lh', alignment=TA_CENTER, leading=16)), [Paragraph('<b><font color="#1B5E20" size="15">7-DAY PERSONALISED DIET CHART</font></b>', ParagraphStyle('th', alignment=TA_CENTER, leading=18)), Spacer(1, 3), Paragraph( '<font color="#33691E"><b>Client:</b></font> Kevin Richard ' '<font color="#33691E"><b>Age/Sex:</b></font> 53 yrs | Male ' '<font color="#33691E"><b>Weight:</b></font> 94.9 kg | BMI: 30.6 | Fat: 31.2% | Visceral Fat: 18 (HIGH)', ParagraphStyle('ci', alignment=TA_CENTER, fontSize=8.5, leading=12)), Paragraph( '<font color="#33691E"><b>Target:</b></font> 76.8 kg | Lose 18.1 kg ' '<font color="#33691E"><b>Loss Rate:</b></font> ~2 kg/week (aggressive β under clinical supervision) ' '<font color="#33691E"><b>Calories:</b></font> ~1600 kcal/day | Protein: 130β140 g', ParagraphStyle('ci2', alignment=TA_CENTER, fontSize=8.5, leading=12)), Paragraph( '<font color="#33691E"><b>Date:</b></font> 25 July 2026 ' '<font color="#33691E"><b>Counsellor:</b></font> Hajira ' '<font color="#33691E"><b>Next Review:</b></font> 2 weeks (aggressive plan β frequent monitoring required)', ParagraphStyle('ci3', alignment=TA_CENTER, fontSize=8.5, leading=12)), ], Paragraph( '<font color="white"><b>DAILY RULES</b></font><br/>' '<font color="#C8E6C9">β’ Dinner before 8 PM<br/>' 'β’ No food after 9 PM<br/>' 'β’ Drink 3L water daily<br/>' 'β’ No OJ β black coffee<br/>' 'β’ Half plate = vegetables<br/>' 'β’ Gym 5β6Γ per week<br/>' 'β’ Alcohol: max 2/week<br/>' 'β’ Sleep by 11 PM</font>', ParagraphStyle('rh', fontSize=8, leading=11, alignment=TA_LEFT)) ]] hdr_table = Table(header_data, colWidths=[4.2*cm, 17.8*cm, 4.0*cm]) hdr_table.setStyle(TableStyle([ ('BACKGROUND', (0,0),(0,0), GREEN_DARK), ('BACKGROUND', (1,0),(1,0), WHITE), ('BACKGROUND', (2,0),(2,0), GREEN_DARK), ('VALIGN', (0,0),(-1,-1), 'MIDDLE'), ('ALIGN', (0,0),(0,0), 'CENTER'), ('ALIGN', (2,0),(2,0), 'LEFT'), ('GRID', (0,0),(-1,-1), 0.5, GREEN_MED), ('TOPPADDING', (0,0),(-1,-1), 6), ('BOTTOMPADDING', (0,0),(-1,-1), 6), ('LEFTPADDING', (0,0),(-1,-1), 6), ('RIGHTPADDING', (0,0),(-1,-1), 6), ('LINEABOVE', (0,0),(-1,0), 2, GREEN_DARK), ('LINEBELOW', (0,0),(-1,0), 2, GREEN_DARK), ])) story.append(hdr_table) story.append(Spacer(1, 5)) # ββ WARNING BAR βββββββββββββββββββββββββββββββββββββββββββββββ warn_table = Table([[ Paragraph('β 1600 kcal is below BMR (1854 kcal). This aggressive plan targets ~2 kg/week loss under ' 'Kolors Health Care clinical supervision. Review every 2 weeks. Increase to 1800 kcal if ' 'fatigue, dizziness or muscle loss is observed.', ParagraphStyle('w', fontSize=7.5, leading=10, textColor=RED_DARK, alignment=TA_CENTER)) ]], colWidths=[sum(CW)]) warn_table.setStyle(TableStyle([ ('BACKGROUND', (0,0),(-1,-1), colors.HexColor('#FFEBEE')), ('GRID', (0,0),(-1,-1), 0.5, RED_DARK), ('TOPPADDING', (0,0),(-1,-1), 4), ('BOTTOMPADDING',(0,0),(-1,-1), 4), ])) story.append(warn_table) story.append(Spacer(1, 4)) # ββ MAIN DIET TABLE βββββββββββββββββββββββββββββββββββββββββββ story.append(table) story.append(Spacer(1, 5)) # ββ VARIETY / SWAP NOTE βββββββββββββββββββββββββββββββββββββββ variety_data = [[ Paragraph('<b><font color="#1B5E20">CARB ROTATION:</font></b> ' 'Brown rice β’ White rice (Β½ cup) β’ Whole wheat chapati (2 pcs) β’ ' 'Whole wheat bread / toast (1 slice) β’ Oats (1 cup) β swap freely based on availability', ParagraphStyle('v', fontSize=7.5, leading=10, textColor=colors.HexColor('#1B5E20'))), Paragraph('<b><font color="#1B5E20">PROTEIN ROTATION:</font></b> ' 'Chicken β’ Fish (any) β’ Beef β’ Mutton β’ Prawns β’ Pork β’ Eggs ' 'β swap any protein on any day at same weight', ParagraphStyle('v2', fontSize=7.5, leading=10, textColor=colors.HexColor('#1B5E20'))), ]] var_table = Table(variety_data, colWidths=[12.65*cm, 12.65*cm]) var_table.setStyle(TableStyle([ ('BACKGROUND', (0,0),(-1,-1), GREEN_LIGHT), ('GRID', (0,0),(-1,-1), 0.5, GREEN_MED), ('TOPPADDING', (0,0),(-1,-1), 5), ('BOTTOMPADDING', (0,0),(-1,-1), 5), ('LEFTPADDING', (0,0),(-1,-1), 6), ('RIGHTPADDING', (0,0),(-1,-1), 6), ])) story.append(var_table) story.append(Spacer(1, 4)) # ββ ALCOHOL + FOOTER βββββββββββββββββββββββββββββββββββββββββ footer_data = [[ Paragraph('<b><font color="white">ALCOHOL:</font></b> ' '<font color="#FFCDD2">Max 2 drinks/week. Choose spirits (whisky/vodka + soda water) over beer. ' 'Never after 9 PM. No alcohol on gym nights.</font>', ParagraphStyle('alc', fontSize=7.5, leading=10, textColor=WHITE)), Paragraph('<font color="white">Kolors Health Care | Client: <b>Kevin Richard</b> | ' 'Date: 25 July 2026 | Counsellor: <b>Hajira</b> | ' 'Target: <b>76.8 kg</b> | Next Review: <b>2 weeks</b></font>', ParagraphStyle('ft', fontSize=7.5, leading=10, textColor=WHITE, alignment=TA_CENTER)), ]] ft_table = Table(footer_data, colWidths=[10*cm, 15.3*cm]) ft_table.setStyle(TableStyle([ ('BACKGROUND', (0,0),(0,0), RED_DARK), ('BACKGROUND', (1,0),(1,0), GREEN_DARK), ('TOPPADDING', (0,0),(-1,-1), 5), ('BOTTOMPADDING', (0,0),(-1,-1), 5), ('LEFTPADDING', (0,0),(-1,-1), 6), ('RIGHTPADDING', (0,0),(-1,-1), 6), ('VALIGN', (0,0),(-1,-1), 'MIDDLE'), ])) story.append(ft_table) doc_obj.build(story) print(f'Saved: {out}') PYEOF python3 /tmp/workspace/kevin-diet/create_professional_chart.py
ls -lh /tmp/workspace/kevin-diet/Kevin_Richard_Professional_DietChart.pdf
Kevin Richard Professional DietChart
PDF Document Β· PDF
| Section | Detail |
|---|---|
| Clinic header | Kolors Health Care branding, full client stats in one clean bar |
| Clinical warning bar | Red alert noting 1600 kcal is below BMR - requires 2-week monitoring review |
| 7-day table | Each day a different protein + carb + cooking style, colour-coded by meal column |
| Macros per day | Protein ~130-140g, Carbs ~120-130g, Fat ~46-50g shown in each row |
| Carb & protein swap note | Green bar below table - chapati / brown rice / oats / bread all listed as interchangeable |
| Alcohol rule | Red footer panel - max 2 drinks/week, spirits over beer, never after 9 PM |
| Kolors footer | Client name, counsellor, date, target weight, next review |
Clinical note: At 1600 kcal with gym 5-6x/week, Kevin will achieve roughly 1-1.5 kg/week loss safely. True 2 kg/week would need under 1400 kcal which risks muscle loss given his 61.9 kg muscle mass - the current plan is the responsible maximum.