attachment
attachment

Make a ppt like it was made by a student and add on front page where the title is add 'made by Chirag yadav, Roll no. 15' prompt:- make ppt according to the coloum given the photo and then explain it in easy way you make it upto 2 pages

Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/agni-ppt && ls /tmp/workspace/agni-ppt/

Writing File

~/agni-ppt/make_ppt.py

from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.oxml.ns import qn
from pptx.util import Inches, Pt
import copy
from lxml import etree

prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)

blank = prs.slide_layouts[6]

# ─────────────────────────────────────────
# HELPER: add a filled rectangle
# ─────────────────────────────────────────
def add_rect(slide, l, t, w, h, fill_rgb, line_rgb=None, line_pt=0):
    shape = slide.shapes.add_shape(1, Inches(l), Inches(t), Inches(w), Inches(h))
    shape.fill.solid()
    shape.fill.fore_color.rgb = fill_rgb
    if line_rgb:
        shape.line.color.rgb = line_rgb
        shape.line.width = Pt(line_pt)
    else:
        shape.line.fill.background()
    return shape

def add_text(slide, text, l, t, w, h, size=14, bold=False, color=RGBColor(0,0,0),
             align=PP_ALIGN.LEFT, italic=False, wrap=True):
    tb = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.margin_left = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top = Pt(2)
    tf.margin_bottom = Pt(2)
    p = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.size = Pt(size)
    run.font.bold = bold
    run.font.italic = italic
    run.font.color.rgb = color
    run.font.name = "Calibri"
    return tb

def add_table_cell(slide, text, l, t, w, h, bg_rgb, txt_rgb=RGBColor(0,0,0),
                   size=11, bold=False, align=PP_ALIGN.CENTER, border=True):
    shape = slide.shapes.add_shape(1, Inches(l), Inches(t), Inches(w), Inches(h))
    shape.fill.solid()
    shape.fill.fore_color.rgb = bg_rgb
    if border:
        shape.line.color.rgb = RGBColor(150, 150, 150)
        shape.line.width = Pt(0.5)
    else:
        shape.line.fill.background()
    tb = slide.shapes.add_textbox(Inches(l+0.04), Inches(t+0.02), Inches(w-0.08), Inches(h-0.04))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(3)
    tf.margin_right = Pt(3)
    tf.margin_top = Pt(1)
    tf.margin_bottom = Pt(1)
    tf.vertical_anchor = MSO_ANCHOR.MIDDLE
    p = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.size = Pt(size)
    run.font.bold = bold
    run.font.color.rgb = txt_rgb
    run.font.name = "Calibri"
    return shape

# =====================================================
# SLIDE 1 – TITLE / FRONT PAGE
# =====================================================
slide1 = prs.slides.add_slide(blank)

# Background – light cream (student-ish)
add_rect(slide1, 0, 0, 13.333, 7.5, RGBColor(255, 252, 240))

# Top banner – deep green (Ayurveda feel)
add_rect(slide1, 0, 0, 13.333, 1.6, RGBColor(27, 94, 60))

# Banner text
add_text(slide1, "PRACTICAL No. 25", 0.3, 0.1, 12.7, 0.6,
         size=26, bold=True, color=RGBColor(255,255,255), align=PP_ALIGN.CENTER)
add_text(slide1, "Agni Assessment Based on Tolerance to Apachara",
         0.3, 0.65, 12.7, 0.8,
         size=18, bold=False, italic=True, color=RGBColor(200,240,210), align=PP_ALIGN.CENTER)

# Student info box
add_rect(slide1, 1.0, 1.9, 5.3, 3.6, RGBColor(240,255,245),
         line_rgb=RGBColor(27,94,60), line_pt=1.2)
add_text(slide1, "📋  Patient Details", 1.1, 1.95, 5.0, 0.45,
         size=13, bold=True, color=RGBColor(27,94,60), align=PP_ALIGN.LEFT)

details = [
    ("Name",        "Isha Kamlesh Lodha"),
    ("Age",         "21 Years"),
    ("Sex",         "Female"),
    ("Occupation",  "Student"),
    ("Address",     "Maharashtra"),
    ("Resident",    "Urban"),
    ("So. Eco. Status", "Middle"),
    ("Education",   "HS (Higher Secondary)"),
]
for i, (k, v) in enumerate(details):
    y = 2.45 + i * 0.36
    add_text(slide1, f"  {k}:", 1.05, y, 2.1, 0.34,
             size=10.5, bold=True, color=RGBColor(40,80,40))
    add_text(slide1, v, 3.1, y, 3.1, 0.34,
             size=10.5, color=RGBColor(30,30,30))

# Right info box – What is Agni?
add_rect(slide1, 7.0, 1.9, 5.8, 3.6, RGBColor(255,248,230),
         line_rgb=RGBColor(180,120,20), line_pt=1.2)
add_text(slide1, "🔥  What is Agni?", 7.15, 1.95, 5.5, 0.45,
         size=13, bold=True, color=RGBColor(140,70,0), align=PP_ALIGN.LEFT)

agni_text = (
    "In Ayurveda, Agni means digestive fire or digestive "
    "strength. It decides how well our body digests and "
    "absorbs food.\n\n"
    "Apachara means irregularity or abnormality in diet.\n\n"
    "This practical checks: How much diet irregularity "
    "can the patient tolerate? This tells us their Agni type."
)
add_text(slide1, agni_text, 7.15, 2.45, 5.55, 3.0,
         size=10.5, color=RGBColor(80,40,0), wrap=True)

# Bottom strip
add_rect(slide1, 0, 6.8, 13.333, 0.7, RGBColor(27,94,60))
add_text(slide1, "Made by Chirag Yadav   |   Roll No. 15   |   Date: 23/09/25",
         0.3, 6.82, 12.7, 0.55,
         size=12, bold=False, color=RGBColor(220,255,230), align=PP_ALIGN.CENTER)

# Decorative horizontal rule under banner
add_rect(slide1, 0, 1.6, 13.333, 0.06, RGBColor(180, 220, 190))

# =====================================================
# SLIDE 2 – ASSESSMENT QUESTIONNAIRE & RESULTS
# =====================================================
slide2 = prs.slides.add_slide(blank)
add_rect(slide2, 0, 0, 13.333, 7.5, RGBColor(255,252,240))

# Top bar
add_rect(slide2, 0, 0, 13.333, 0.9, RGBColor(27,94,60))
add_text(slide2, "Assessment Questionnaire & Results – Agni Type",
         0.3, 0.1, 12.7, 0.75,
         size=20, bold=True, color=RGBColor(255,255,255), align=PP_ALIGN.CENTER)

# ── Section A: Assessment Table ──────────────────────
add_text(slide2, "📝  Assessment Questionnaire", 0.4, 1.05, 7.5, 0.4,
         size=13, bold=True, color=RGBColor(27,94,60))

# Table header
HEADER_BG = RGBColor(27, 94, 60)
HEADER_TXT = RGBColor(255,255,255)
ROW_ODD    = RGBColor(240,255,245)
ROW_EVEN   = RGBColor(255,255,255)

# Col widths: 2.3, 5.2, 2.0 = 9.5 total, starting at 0.4
cols = [0.4, 2.7, 7.9]  # left edges
widths = [2.3, 5.2, 2.0]

headers = ["Question", "Answer / Description", "Agni Type"]
for ci, (hdr, lx, ww) in enumerate(zip(headers, cols, widths)):
    add_table_cell(slide2, hdr, lx, 1.5, ww, 0.4,
                   HEADER_BG, HEADER_TXT, size=11, bold=True)

rows = [
    ("Q1: Capability to tolerate irregularities in diet",
     "Digestion gets affected by considerable abnormality / irregularity in food intake",
     "Samagni ✅"),
    ("",
     "Always capable to tolerate any type of abnormality / irregularity",
     "Teekshnagni"),
    ("",
     "Fluctuating nature in tolerating abnormality / irregularity",
     "Vishamagni"),
    ("",
     "Not capable to tolerate even minimum abnormality / irregularity",
     "Mandagni"),
    ("Q2: Type of Agni as assessed by standard tool*",
     "Score obtained: 81%",
     "Samagni ✅"),
]
row_bgs = [ROW_ODD, ROW_EVEN, ROW_ODD, ROW_EVEN, ROW_ODD]
for ri, (row, bg) in enumerate(zip(rows, row_bgs)):
    y = 1.9 + ri * 0.52
    for ci, (cell, lx, ww) in enumerate(zip(row, cols, widths)):
        add_table_cell(slide2, cell, lx, y, ww, 0.5, bg,
                       size=10 if ri == 0 else 9.5,
                       bold=(ci == 2 and row[2].endswith("✅")),
                       align=PP_ALIGN.CENTER if ci != 1 else PP_ALIGN.LEFT)

# ── Section B: Interpretation ─────────────────────────
add_text(slide2, "📊  Interpretation of Results",
         0.4, 4.65, 6.0, 0.4, size=13, bold=True, color=RGBColor(27,94,60))

interp_data = [
    ("Samagni",    "81%",  RGBColor(27,150,60),   True),
    ("Teekshnagni","20%",  RGBColor(200,130,0),   False),
    ("Vishamagni", "0%",   RGBColor(150,150,150), False),
    ("Mandagni",   "0%",   RGBColor(150,150,150), False),
]
bar_x = 0.4
bar_y = 5.1
bw = 2.9
for i, (label, pct, col, highlight) in enumerate(interp_data):
    x = bar_x + i * 3.1
    # Bar background
    add_rect(slide2, x, bar_y, bw, 0.5, RGBColor(230,230,230))
    # Filled bar
    fill_w = bw * int(pct.replace("%","")) / 100
    if fill_w > 0:
        add_rect(slide2, x, bar_y, fill_w, 0.5, col)
    add_text(slide2, f"{label}: {pct}", x, bar_y + 0.52, bw, 0.35,
             size=11, bold=highlight, color=col, align=PP_ALIGN.CENTER)

# Conclusion box
add_rect(slide2, 0.4, 6.05, 12.5, 0.55, RGBColor(27,94,60),
         line_rgb=RGBColor(0,80,30), line_pt=1)
add_text(slide2, "✅  Conclusion: Both observations (Q1 & Q2) match with each other → Patient's Agni type is SAMAGNI (Balanced Digestion)",
         0.55, 6.1, 12.2, 0.5,
         size=11, bold=True, color=RGBColor(255,255,255), align=PP_ALIGN.CENTER)

# Bottom strip
add_rect(slide2, 0, 6.95, 13.333, 0.55, RGBColor(180,220,190))
add_text(slide2, "Made by Chirag Yadav  |  Roll No. 15  |  Practical No. 25 – Agni Assessment",
         0.3, 6.97, 12.7, 0.45,
         size=10, color=RGBColor(20,60,20), align=PP_ALIGN.CENTER)

# ── Side note: 4 Agni Types ────────────────────────────
add_rect(slide2, 10.0, 1.05, 3.0, 3.5, RGBColor(255,248,220),
         line_rgb=RGBColor(180,120,0), line_pt=0.8)
add_text(slide2, "🔥 4 Types of Agni", 10.1, 1.1, 2.8, 0.4,
         size=11, bold=True, color=RGBColor(140,70,0))
types_info = [
    ("Samagni",    "Normal & balanced digestion"),
    ("Teekshnagni","Very strong, fast digestion"),
    ("Vishamagni", "Irregular / variable digestion"),
    ("Mandagni",   "Weak, slow digestion"),
]
for i, (t, desc) in enumerate(types_info):
    y = 1.55 + i * 0.72
    add_text(slide2, t, 10.1, y, 2.8, 0.32,
             size=10, bold=True, color=RGBColor(100,50,0))
    add_text(slide2, desc, 10.1, y + 0.3, 2.8, 0.36,
             size=9, color=RGBColor(80,40,0), italic=True)

# Shrink assessment table width to fit side box
# (tables already fit within 0.4 to 9.9, side box starts at 10.0 — fine)

prs.save("/tmp/workspace/agni-ppt/Agni_Assessment_Chirag_Yadav.pptx")
print("Saved!")
Running Command

cd /tmp/workspace/agni-ppt && python make_ppt.py

Your PPT is ready! Here's the download link:

Agni Assessment Chirag Yadav

Presentation · PPTX


Here's what's in each slide:
Slide 1 - Title / Front Page
  • Big green header: "PRACTICAL No. 25 - Agni Assessment Based on Tolerance to Apachara"
  • Left box: All patient details (Isha Kamlesh Lodha, 21 yrs, Female, Student, Maharashtra, Urban, Middle SES, HS education)
  • Right box: Simple explanation of what Agni and Apachara mean (in easy language)
  • Bottom strip: Made by Chirag Yadav | Roll No. 15 | Date: 23/09/25
Slide 2 - Assessment Table & Results
  • Full assessment questionnaire table with all 4 Agni types explained and the answered option highlighted (Samagni ✅)
  • Visual bar chart showing the interpretation scores: Samagni 81%, Teekshnagni 20%, Vishamagni 0%, Mandagni 0%
  • Side box explaining all 4 types of Agni in simple words
  • Green conclusion banner: Both Q1 and Q2 match - Patient's Agni is SAMAGNI (Balanced Digestion)
The whole presentation uses a green Ayurvedic theme and is kept simple like a student project!
This is a shared conversation. Sign in to Orris to start your own chat.