mechanism of secretion and composition of different digestive juices. ppt can you please generate for me

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/digestive-juices-ppt && ls /tmp/workspace/

Writing File

~/digestive-juices-ppt/build_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.util import Inches, Pt
from io import BytesIO

# Color palette - medical blue theme
DARK_BLUE   = RGBColor(0x0D, 0x3B, 0x6E)   # deep navy
MED_BLUE    = RGBColor(0x15, 0x6B, 0xA5)   # medium blue
LIGHT_BLUE  = RGBColor(0xD6, 0xEA, 0xF8)   # pale blue background
ACCENT      = RGBColor(0x1A, 0xBC, 0x9C)   # teal accent
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
DARK_TEXT   = RGBColor(0x1C, 0x1C, 0x1C)
ORANGE      = RGBColor(0xE6, 0x7E, 0x22)
GREEN       = RGBColor(0x27, 0xAE, 0x60)
PURPLE      = RGBColor(0x8E, 0x44, 0xAD)
RED         = RGBColor(0xC0, 0x39, 0x2B)
LIGHT_GRAY  = RGBColor(0xF4, 0xF6, 0xF7)

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

blank = prs.slide_layouts[6]

# ─── helpers ────────────────────────────────────────────────────────────────

def add_rect(slide, l, t, w, h, fill_color, border_color=None, border_pt=0):
    shape = slide.shapes.add_shape(
        1,  # MSO_SHAPE_TYPE.RECTANGLE
        Inches(l), Inches(t), Inches(w), Inches(h)
    )
    shape.fill.solid()
    shape.fill.fore_color.rgb = fill_color
    if border_color:
        shape.line.color.rgb = border_color
        shape.line.width = Pt(border_pt)
    else:
        shape.line.fill.background()
    return shape

def add_text(slide, text, l, t, w, h,
             font_name="Calibri", font_size=16, bold=False, italic=False,
             color=DARK_TEXT, align=PP_ALIGN.LEFT, wrap=True,
             v_anchor=MSO_ANCHOR.TOP, bg_color=None):
    tb = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.vertical_anchor = v_anchor
    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.name  = font_name
    run.font.size  = Pt(font_size)
    run.font.bold  = bold
    run.font.italic= italic
    run.font.color.rgb = color
    return tb

def add_bullet_box(slide, title, bullets, l, t, w, h,
                   title_color=WHITE, title_bg=MED_BLUE,
                   bullet_color=DARK_TEXT, bullet_size=13,
                   title_size=14, box_bg=WHITE, border_color=MED_BLUE):
    """Draw a titled box with bullet points."""
    # header
    add_rect(slide, l, t, w, 0.35, title_bg)
    add_text(slide, title, l+0.05, t+0.02, w-0.1, 0.31,
             font_size=title_size, bold=True, color=title_color,
             align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)
    # body
    body_h = h - 0.35
    body_shape = add_rect(slide, l, t+0.35, w, body_h, box_bg, border_color, 1)
    # bullets text box
    tb = slide.shapes.add_textbox(
        Inches(l+0.08), Inches(t+0.38), Inches(w-0.15), Inches(body_h-0.06))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.vertical_anchor = MSO_ANCHOR.TOP
    tf.margin_left  = Pt(2)
    tf.margin_right = Pt(2)
    tf.margin_top   = Pt(2)
    tf.margin_bottom= Pt(2)
    first = True
    for b in bullets:
        if first:
            p = tf.paragraphs[0]
            first = False
        else:
            p = tf.add_paragraph()
        p.space_before = Pt(2)
        p.space_after  = Pt(1)
        run = p.add_run()
        run.text = b
        run.font.name = "Calibri"
        run.font.size = Pt(bullet_size)
        run.font.color.rgb = bullet_color


def header_bar(slide, title, subtitle=None):
    """Top gradient-style header bar."""
    add_rect(slide, 0, 0, 13.333, 1.1, DARK_BLUE)
    add_rect(slide, 0, 0.85, 13.333, 0.25, MED_BLUE)
    add_text(slide, title, 0.3, 0.05, 12.7, 0.72,
             font_name="Calibri", font_size=30, bold=True,
             color=WHITE, align=PP_ALIGN.LEFT, v_anchor=MSO_ANCHOR.MIDDLE)
    if subtitle:
        add_text(slide, subtitle, 0.3, 0.75, 12.7, 0.28,
                 font_name="Calibri", font_size=13, italic=True,
                 color=LIGHT_BLUE, align=PP_ALIGN.LEFT)

def section_label(slide, text, l, t, w=2.8, color=MED_BLUE):
    add_rect(slide, l, t, w, 0.3, color)
    add_text(slide, text, l+0.05, t+0.02, w-0.1, 0.26,
             font_size=11, bold=True, color=WHITE,
             align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 1 – TITLE                                           ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
# Background
add_rect(slide, 0, 0, 13.333, 7.5, DARK_BLUE)
add_rect(slide, 0, 4.5, 13.333, 3.0, MED_BLUE)
# Decorative strip
add_rect(slide, 0, 4.3, 13.333, 0.25, ACCENT)

add_text(slide,
         "Digestive Juices",
         1.0, 1.0, 11.3, 1.4,
         font_name="Calibri", font_size=52, bold=True,
         color=WHITE, align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
add_text(slide,
         "Mechanism of Secretion & Composition",
         1.0, 2.5, 11.3, 0.7,
         font_name="Calibri", font_size=26, bold=False, italic=True,
         color=LIGHT_BLUE, align=PP_ALIGN.CENTER)
add_text(slide,
         "Saliva  |  Gastric Juice  |  Pancreatic Juice  |  Bile  |  Intestinal Juice",
         1.0, 3.3, 11.3, 0.55,
         font_name="Calibri", font_size=15,
         color=ACCENT, align=PP_ALIGN.CENTER)
add_text(slide,
         "Based on Guyton & Hall, Costanzo Physiology, Harrison's Principles of Internal Medicine",
         1.0, 6.5, 11.3, 0.6,
         font_name="Calibri", font_size=11, italic=True,
         color=RGBColor(0xBD, 0xD7, 0xEA), align=PP_ALIGN.CENTER)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 2 – OVERVIEW TABLE                                   ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Overview of Digestive Secretions",
           "Volume, pH, and primary functions of major GI juices")

# Table header
cols = [("Juice", 2.0), ("Volume/day", 1.8), ("pH", 1.1), ("Source", 2.4), ("Primary Function", 5.533)]
x = 0.2
add_rect(slide, 0.2, 1.25, 12.93, 0.38, DARK_BLUE)
for col, cw in cols:
    add_text(slide, col, x+0.05, 1.27, cw-0.1, 0.34,
             font_size=12, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             v_anchor=MSO_ANCHOR.MIDDLE)
    x += cw

rows = [
    ("Saliva", "800-1500 mL", "6.0-7.0", "Parotid, submandibular, sublingual glands", "Lubrication, starch digestion, antibacterial"),
    ("Gastric Juice", "1500 mL", "1.0-3.5", "Fundic/oxyntic glands, pyloric glands", "Protein digestion, sterilisation, intrinsic factor"),
    ("Pancreatic Juice", "1000-1500 mL", "8.0-8.3", "Acinar & ductal cells of exocrine pancreas", "Digests proteins, carbs, fats; neutralises gastric acid"),
    ("Bile", "500-1000 mL", "7.8", "Hepatocytes → gallbladder storage", "Emulsification of fats, cholesterol excretion"),
    ("Intestinal Juice", "1800 mL", "7.5-8.0", "Crypts of Lieberkühn, Brunner's glands", "Mucus protection, disaccharidases, peptidases"),
]
row_colors = [LIGHT_BLUE, WHITE, LIGHT_BLUE, WHITE, LIGHT_BLUE]
for ri, (row, bg) in enumerate(zip(rows, row_colors)):
    y = 1.63 + ri * 0.9
    add_rect(slide, 0.2, y, 12.93, 0.88, bg, MED_BLUE, 0.5)
    x = 0.2
    for ci, (cell, (_, cw)) in enumerate(zip(row, cols)):
        is_first = ci == 0
        add_text(slide, cell, x+0.07, y+0.04, cw-0.12, 0.80,
                 font_size=12, bold=is_first, color=DARK_BLUE if is_first else DARK_TEXT,
                 align=PP_ALIGN.LEFT if ci > 1 else PP_ALIGN.CENTER,
                 wrap=True, v_anchor=MSO_ANCHOR.MIDDLE)
        x += cw

add_text(slide, "Source: Guyton & Hall, Table 65.1", 0.3, 7.15, 8.0, 0.3,
         font_size=9, italic=True, color=RGBColor(0x7F, 0x8C, 0x8D))


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 3 – SALIVA  (mechanism)                             ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Saliva – Mechanism of Secretion",
           "Two-stage process: acinar primary secretion + ductal modification")

# Left column: glands & two-stage mechanism
add_bullet_box(slide, "Salivary Glands",
    ["• Parotid gland — serous secretion (ptyalin/amylase)",
     "• Submandibular gland — mixed (serous + mucus)",
     "• Sublingual gland — mixed (serous + mucus)",
     "• Buccal (minor) glands — mucus only"],
    0.2, 1.2, 4.3, 2.0,
    title_bg=DARK_BLUE, bullet_size=12)

add_bullet_box(slide, "Stage 1 – Acinar Primary Secretion",
    ["• Acinar cells secrete isotonic primary saliva",
     "• Electrolyte composition similar to plasma",
     "• Contains ptyalin (alpha-amylase) and/or mucin",
     "• Driven by neural stimulation (ACh via muscarinic receptors)"],
    0.2, 3.3, 4.3, 2.2,
    title_bg=MED_BLUE, bullet_size=12)

# Middle column: ductal modification
add_bullet_box(slide, "Stage 2 – Ductal Modification",
    ["• Na+ is actively reabsorbed from ducts",
     "• K+ is actively secreted in exchange for Na+",
     "• Creates -70 mV negativity → Cl- reabsorbed passively",
     "• HCO3- is secreted into ductal lumen",
     "• Net result: final saliva is hypotonic",
     "• Ductal cells are water-impermeable (no osmotic water follow)"],
    4.65, 1.2, 4.3, 2.9,
    title_bg=DARK_BLUE, bullet_size=12)

add_bullet_box(slide, "Neural Control",
    ["• Parasympathetic (VII, IX): ACh → muscarinic → IP3/Ca2+ → profuse secretion",
     "• Sympathetic (T1-T3 → superior cervical ganglion): NE → beta-adrenergic → cAMP → stimulates secretion",
     "• Both divisions are stimulatory (unique among GI glands)",
     "• Conditioned reflexes (Pavlov's dogs), taste, smell trigger secretion"],
    4.65, 4.25, 4.3, 2.7,
    title_bg=GREEN, bullet_size=11)

# Right column: composition summary
add_bullet_box(slide, "Ionic Composition (vs Plasma)",
    ["  Ion       Saliva    Plasma",
     "  Na+       15 mEq/L  142 mEq/L",
     "  K+        30 mEq/L  4.5 mEq/L",
     "  Cl-       15 mEq/L  103 mEq/L",
     "  HCO3-     50 mEq/L  25 mEq/L",
     "",
     "Flow rate effect: at HIGH flow",
     "saliva composition resembles plasma"],
    9.1, 1.2, 4.0, 3.2,
    title_bg=PURPLE, bullet_size=11)

add_bullet_box(slide, "Organic Components",
    ["• alpha-Amylase (ptyalin) — starch digestion",
     "• Lingual lipase — lipid digestion initiation",
     "• Mucin glycoproteins — lubrication",
     "• Secretory IgA — antibacterial",
     "• Kallikrein — cleaves kininogen → bradykinin (vasodilator)",
     "• Lactoferrin, lysozyme — antimicrobial"],
    9.1, 4.55, 4.0, 2.4,
    title_bg=ORANGE, bullet_size=11)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 4 – GASTRIC JUICE (mechanism)                       ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Gastric Juice – Mechanism of Secretion",
           "Oxyntic (gastric) glands secrete HCl, pepsinogen, intrinsic factor, and mucus")

add_bullet_box(slide, "Cell Types & Products",
    ["• Mucous neck cells — mucus (protect mucosa)",
     "• Chief (peptic) cells — pepsinogen (inactive)",
     "• Parietal (oxyntic) cells — HCl + intrinsic factor",
     "• ECL (enterochromaffin-like) cells — histamine",
     "• G cells (antrum/pyloric glands) — gastrin",
     "• Pyloric gland cells — mucus + gastrin"],
    0.2, 1.2, 4.3, 2.55,
    title_bg=DARK_BLUE, bullet_size=12)

add_bullet_box(slide, "HCl Secretion by Parietal Cells",
    ["• Driven by H+/K+-ATPase (proton pump) on apical membrane",
     "• H+ conc = ~160 mmol/L (pH ~0.8)",
     "• 3 million times higher than arterial blood",
     "• Requires >1500 cal of energy per litre",
     "• Cl- actively transported into canaliculus",
     "• HCO3- exchanged for Cl- on basolateral side (alkaline tide)",
     "• CO2 + H2O → H2CO3 → H+ + HCO3- (carbonic anhydrase)"],
    0.2, 3.85, 4.3, 2.85,
    title_bg=RED, bullet_size=11)

add_bullet_box(slide, "Regulation — 3 Phases",
    ["CEPHALIC PHASE (30%)",
     "• Sight/smell/taste → vagus nerve → ACh → parietal cells",
     "• Also stimulates G cells (gastrin) and ECL cells (histamine)",
     "",
     "GASTRIC PHASE (60%)",
     "• Food distension → local reflexes + vagal reflexes",
     "• Peptides/amino acids → G cells → gastrin → parietal cells",
     "• Gastrin → ECL cells → histamine → H2 receptors on parietal cells",
     "",
     "INTESTINAL PHASE (10%)",
     "• Chyme in small intestine → enteric hormones",
     "• GIP, secretin, CCK inhibit gastric acid secretion"],
    4.65, 1.2, 4.3, 5.5,
    title_bg=DARK_BLUE, bullet_size=11)

add_bullet_box(slide, "Pepsinogen Activation",
    ["• Chief cells secrete PEPSINOGEN (inactive)",
     "• HCl cleaves pepsinogen → pepsin (active)",
     "• Pepsin autocatalytically activates more pepsinogen",
     "• Pepsin active at pH 1.8–3.5",
     "• Cleaves peptide bonds → polypeptides",
     "• Inactivated at pH >5 in duodenum"],
    9.1, 1.2, 4.0, 2.5,
    title_bg=ORANGE, bullet_size=12)

add_bullet_box(slide, "Intrinsic Factor & Mucus",
    ["• Intrinsic Factor (IF): secreted by parietal cells",
     "• IF binds vitamin B12 → absorbed in terminal ileum",
     "• Deficiency → pernicious anaemia",
     "",
     "• Mucus: secreted by surface epithelial & neck cells",
     "• Forms 1-1.5 mm thick gel layer",
     "• pH gradient: pH 1 (lumen) → pH 7 (epithelial surface)"],
    9.1, 3.85, 4.0, 2.85,
    title_bg=GREEN, bullet_size=11)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 5 – GASTRIC JUICE COMPOSITION                        ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Gastric Juice – Composition",
           "Volume: ~1500 mL/day | pH: 1.0-3.5")

# Components table
headers = ["Component", "Concentration/Amount", "Source Cell", "Function"]
col_widths = [2.5, 2.8, 2.8, 4.633]
x = 0.2
add_rect(slide, 0.2, 1.25, 12.93, 0.38, DARK_BLUE)
for hdr, cw in zip(headers, col_widths):
    add_text(slide, hdr, x+0.05, 1.27, cw-0.1, 0.34,
             font_size=12, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             v_anchor=MSO_ANCHOR.MIDDLE)
    x += cw

rows = [
    ("Hydrochloric Acid (HCl)", "~160 mmol/L; pH 0.8", "Parietal (oxyntic) cells", "Protein denaturation, pepsinogen activation, antimicrobial"),
    ("Pepsinogen / Pepsin", "Active at pH 1.8-3.5", "Chief (peptic) cells", "Initiates protein digestion into polypeptides"),
    ("Intrinsic Factor", "Binds vitamin B12", "Parietal cells", "Essential for B12 absorption in terminal ileum"),
    ("Mucus", "Gel layer 1-1.5 mm thick", "Surface epithelial, neck cells", "Protects mucosa from acid & pepsin"),
    ("Gastrin", "Hormone (blood-borne)", "G cells (antrum)", "Stimulates parietal cells; promotes gastric motility"),
    ("Gastric Lipase", "Minor secretion", "Chief cells", "Initiates lipid digestion; active at acid pH"),
]
row_colors = [LIGHT_BLUE, WHITE, LIGHT_BLUE, WHITE, LIGHT_BLUE, WHITE]
for ri, (row, bg) in enumerate(zip(rows, row_colors)):
    y = 1.63 + ri * 0.85
    add_rect(slide, 0.2, y, 12.93, 0.83, bg, MED_BLUE, 0.5)
    x = 0.2
    for ci, (cell, cw) in enumerate(zip(row, col_widths)):
        is_first = ci == 0
        add_text(slide, cell, x+0.07, y+0.03, cw-0.12, 0.77,
                 font_size=12, bold=is_first, color=DARK_BLUE if is_first else DARK_TEXT,
                 align=PP_ALIGN.LEFT, wrap=True, v_anchor=MSO_ANCHOR.MIDDLE)
        x += cw

add_text(slide, "Note: Intrinsic Factor is the ONLY essential component of gastric juice — its loss causes pernicious anaemia",
         0.3, 6.8, 12.7, 0.5,
         font_size=11, italic=True, bold=True, color=RED, align=PP_ALIGN.LEFT)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 6 – PANCREATIC JUICE (mechanism)                    ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Pancreatic Juice – Mechanism of Secretion",
           "Acinar cells (enzymes) + Centroacinar/ductal cells (HCO3- aqueous component)")

add_bullet_box(slide, "Structure",
    ["• Exocrine pancreas = 90% of pancreatic mass",
     "• Organized like salivary glands — grape-like acini",
     "• Acinar cells at blind ends of branching ducts",
     "• Centroacinar cells extend into acinus from ducts",
     "• Ducts coalesce → pancreatic duct → ampulla of Vater",
     "• Sphincter of Oddi controls release into duodenum"],
    0.2, 1.2, 4.3, 2.5,
    title_bg=DARK_BLUE, bullet_size=12)

add_bullet_box(slide, "Enzymatic Component (Acinar Cells)",
    ["• CCK (cholecystokinin) binds CCK-A receptors on acinar cells",
     "• IP3/Ca2+ second messenger pathway",
     "• Triggers exocytosis of zymogen granules",
     "• Vagal (ACh) stimulation also activates acinar cells",
     "• Enzymes secreted as inactive zymogens (proenzymes)",
     "• Trypsin inhibitor co-secreted — prevents auto-digestion"],
    0.2, 3.8, 4.3, 2.8,
    title_bg=ORANGE, bullet_size=12)

add_bullet_box(slide, "Aqueous HCO3- Component (Ductal Cells)",
    ["• Secretin stimulates ductal/centroacinar cells",
     "• Secretin binds receptor → adenylyl cyclase → cAMP",
     "• CFTR Cl- channel opens on apical membrane",
     "• Cl-/HCO3- exchanger secretes HCO3- into lumen",
     "• Na+ follows passively; water follows osmotically",
     "• Result: large volume of HCO3--rich fluid (pH 8.0-8.3)",
     "• Neutralises gastric acid in duodenum"],
    4.65, 1.2, 4.3, 3.4,
    title_bg=MED_BLUE, bullet_size=12)

add_bullet_box(slide, "Hormonal & Neural Regulation",
    ["SECRETIN (S cells, duodenum):",
     "• Triggered by acid (H+) in duodenum",
     "• Stimulates HCO3- aqueous secretion",
     "",
     "CCK (I cells, duodenum/jejunum):",
     "• Triggered by fats & proteins in duodenum",
     "• Stimulates enzyme secretion",
     "",
     "VAGUS NERVE:",
     "• Cephalic phase enzyme secretion",
     "• Potentiates hormonal effects",
     "",
     "SYMPATHETIC: Inhibits secretion"],
    4.65, 4.7, 4.3, 2.3,
    title_bg=DARK_BLUE, bullet_size=11)

add_bullet_box(slide, "Zymogen Activation Cascade",
    ["Enterokinase (brush border duodenum):",
     "  Trypsinogen → TRYPSIN (active)",
     "",
     "Trypsin then activates:",
     "  Trypsinogen → more Trypsin (autocatalysis)",
     "  Chymotrypsinogen → Chymotrypsin",
     "  Procarboxypeptidase → Carboxypeptidase",
     "  Proelastase → Elastase",
     "  Prophospholipase → Phospholipase A2",
     "",
     "Pancreatic lipase: active without activation"],
    9.1, 1.2, 4.0, 5.8,
    title_bg=RED, bullet_size=11)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 7 – PANCREATIC JUICE COMPOSITION                     ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Pancreatic Juice – Composition",
           "Volume: ~1000-1500 mL/day | pH: 8.0-8.3 (alkaline)")

# Left: aqueous
add_bullet_box(slide, "Aqueous (Inorganic) Component",
    ["• Water — major constituent",
     "• Sodium bicarbonate (NaHCO3) — high concentration (up to 145 mEq/L)",
     "  → Neutralises gastric HCl in duodenum",
     "  → Raises duodenal pH to 6-7 (optimal for pancreatic enzymes)",
     "• Na+, K+, Ca2+, Mg2+ — concentrations similar to plasma",
     "• HCO3- inversely related to Cl- (as flow rate increases, HCO3- rises, Cl- falls)"],
    0.2, 1.2, 6.3, 2.5,
    title_bg=MED_BLUE, bullet_size=12)

# Enzymes table
add_rect(slide, 0.2, 3.8, 6.3, 0.38, DARK_BLUE)
for hdr, xpos, cw in [("Enzyme/Precursor", 0.25, 2.5), ("Substrate", 2.75, 1.8), ("Active Form", 4.55, 2.05)]:
    add_text(slide, hdr, xpos, 3.82, cw-0.05, 0.34,
             font_size=11, bold=True, color=WHITE, align=PP_ALIGN.CENTER,
             v_anchor=MSO_ANCHOR.MIDDLE)

prot_enzymes = [
    ("Trypsinogen", "Proteins/polypeptides", "Trypsin"),
    ("Chymotrypsinogen", "Aromatic AA bonds", "Chymotrypsin"),
    ("Procarboxypeptidase", "C-terminal AA", "Carboxypeptidase"),
    ("Proelastase", "Elastin", "Elastase"),
]
for ri, (name, sub, act) in enumerate(prot_enzymes):
    y = 4.18 + ri*0.44
    bg = LIGHT_BLUE if ri%2==0 else WHITE
    add_rect(slide, 0.2, y, 6.3, 0.43, bg, MED_BLUE, 0.4)
    add_text(slide, name, 0.25, y+0.03, 2.45, 0.37, font_size=11, bold=True, color=DARK_BLUE, wrap=True)
    add_text(slide, sub,  2.75, y+0.03, 1.75, 0.37, font_size=11, color=DARK_TEXT, wrap=True)
    add_text(slide, act,  4.55, y+0.03, 2.0,  0.37, font_size=11, color=GREEN, bold=True, wrap=True)

add_text(slide, "PROTEOLYTIC ENZYMES (inactive zymogens):", 0.25, 3.65, 6.0, 0.2,
         font_size=10, bold=True, italic=True, color=DARK_BLUE)

# Right column
add_bullet_box(slide, "Carbohydrate-Digesting Enzymes",
    ["• Pancreatic amylase — hydrolyses starch, glycogen",
     "  → Products: maltose, maltotriose, alpha-dextrins",
     "• NOT cellulose (lacks glycosidic bond cleavage)"],
    6.7, 1.2, 6.4, 1.55,
    title_bg=GREEN, bullet_size=12)

add_bullet_box(slide, "Lipid-Digesting Enzymes",
    ["• Pancreatic lipase — hydrolyses triglycerides",
     "  → Free fatty acids + monoglycerides",
     "  → Works best with bile salt emulsification",
     "• Colipase — cofactor; displaces bile salts from lipase",
     "• Cholesterol esterase — hydrolyses cholesterol esters",
     "• Phospholipase A2 — splits fatty acids from phospholipids",
     "  (activated by trypsin)"],
    6.7, 2.85, 6.4, 2.7,
    title_bg=ORANGE, bullet_size=12)

add_bullet_box(slide, "Other Components",
    ["• Ribonuclease (RNase), DNase — nucleic acid digestion",
     "• Trypsin inhibitor — prevents auto-activation in pancreas",
     "• Lactoferrin — antimicrobial",
     "• Bicarbonate (key inorganic component)"],
    6.7, 5.65, 6.4, 1.6,
    title_bg=PURPLE, bullet_size=12)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 8 – BILE (mechanism & composition)                  ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Bile – Mechanism of Secretion & Composition",
           "Hepatic bile: ~500-1000 mL/day | pH: 7.8 | Concentrated 5-10x in gallbladder")

add_bullet_box(slide, "Bile Secretion Pathway",
    ["• Synthesised continuously by HEPATOCYTES",
     "• Secreted into bile canaliculi (between hepatocytes)",
     "• Flows into canals of Hering → bile ductules → interlobular ducts",
     "• Right + Left hepatic ducts → Common hepatic duct",
     "• Common hepatic duct + cystic duct → Common bile duct (CBD)",
     "• CBD enters duodenum via ampulla of Vater / sphincter of Oddi",
     "• Between meals: sphincter of Oddi closed → bile diverted to gallbladder"],
    0.2, 1.2, 4.5, 3.3,
    title_bg=DARK_BLUE, bullet_size=11)

add_bullet_box(slide, "Mechanism of Hepatocyte Secretion",
    ["Active transport across canalicular membrane:",
     "• BSEP (ABCB11) — bile salt export pump",
     "• MRP2 (ABCC2) — bilirubin glucuronides, drugs",
     "• MDR3 (ABCB4) — phospholipid export",
     "• ABCG5/G8 — cholesterol export",
     "",
     "Sinusoidal (portal blood) uptake:",
     "• NTCP (SLC10A1) — Na+/taurocholate cotransporter",
     "• OATPs — organic anion-transporting polypeptides",
     "",
     "Cholangiocyte secretion:",
     "• Secretin → cAMP → CFTR → HCO3- rich fluid added to bile"],
    0.2, 4.6, 4.5, 2.65,
    title_bg=MED_BLUE, bullet_size=10)

add_bullet_box(slide, "Gallbladder Concentration",
    ["• Gallbladder absorbs water, Na+, Cl-, HCO3-",
     "• Bile concentrated 5-10x (3-4 g/dL → 10-15 g/dL)",
     "• Cholecystokinin (CCK): stimulates GB contraction",
     "• Sphincter of Oddi relaxes → bile enters duodenum",
     "• Secretin: stimulates bile flow from hepatocytes",
     "• Vagal stimulation: mild stimulation of bile secretion"],
    4.85, 1.2, 4.2, 2.5,
    title_bg=ORANGE, bullet_size=12)

add_bullet_box(slide, "Composition of Bile",
    ["Major components (mole %) - Hepatic bile:",
     "• Bile acids (bile salts)     — 80%",
     "• Phospholipids (lecithin)    — 16%",
     "• Cholesterol (unesterified)  — 4%",
     "  (up to 8-10% in lithogenic state)",
     "",
     "Other constituents:",
     "• Conjugated bilirubin (gives yellow-green colour)",
     "• Electrolytes (Na+, K+, Ca2+, Cl-, HCO3-)",
     "• Proteins: IgA, albumin, hormone metabolites",
     "• Mucus glycoproteins",
     "• Heavy metals, drug metabolites"],
    4.85, 3.8, 4.2, 3.45,
    title_bg=DARK_BLUE, bullet_size=11)

add_bullet_box(slide, "Bile Acids & Enterohepatic Circulation",
    ["Primary bile acids (synthesised in liver):",
     "  • Cholic acid, Chenodeoxycholic acid",
     "  • Conjugated with glycine or taurine",
     "",
     "Secondary bile acids (formed by gut bacteria):",
     "  • Deoxycholic acid, Lithocholic acid",
     "",
     "Enterohepatic circulation:",
     "  • 90-95% of bile acids reabsorbed in terminal ileum",
     "  • Returns to liver via portal vein",
     "  • Recycled 6-10 times per day",
     "  • Only ~500 mg lost in faeces daily",
     "",
     "Functions:",
     "  • Emulsify dietary fats",
     "  • Form micelles with fatty acids"],
    9.2, 1.2, 3.9, 5.6,
    title_bg=GREEN, bullet_size=10)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 9 – INTESTINAL JUICE (succus entericus)              ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Intestinal Juice (Succus Entericus)",
           "Volume: ~1800 mL/day | pH: 7.5-8.0 | Secreted by crypts of Lieberkühn & Brunner's glands")

add_bullet_box(slide, "Sources of Intestinal Secretion",
    ["1. Crypts of Lieberkühn (small intestine)",
     "   • Goblet cells — mucus secretion",
     "   • Enterocytes — watery secretion (electrolytes + water)",
     "   • Paneth cells — antimicrobial peptides (defensins, lysozyme)",
     "",
     "2. Brunner's Glands (duodenum)",
     "   • Submucosal compound tubular glands",
     "   • Secrete alkaline mucus (pH 8.0-8.9)",
     "   • Protect duodenal mucosa from gastric acid",
     "   • Stimulated by: tactile irritation, vagal, secretin"],
    0.2, 1.2, 4.4, 4.5,
    title_bg=DARK_BLUE, bullet_size=11)

add_bullet_box(slide, "Regulation of Secretion",
    ["• Local mechanical stimulation (food/chyme contact)",
     "• Vagal (parasympathetic) stimulation",
     "• Secretin and CCK enhance intestinal secretion",
     "• VIP (vasoactive intestinal peptide) — major secretagogue",
     "  → cAMP-mediated Cl- secretion (CFTR)",
     "• Enterotoxins (cholera toxin, E. coli) exploit this pathway",
     "  → massive secretory diarrhoea"],
    0.2, 5.8, 4.4, 1.6,
    title_bg=MED_BLUE, bullet_size=11)

add_bullet_box(slide, "Brush Border Enzymes (Surface Enzymes)",
    ["Carbohydrases:",
     "  • Sucrase — sucrose → glucose + fructose",
     "  • Maltase — maltose → glucose + glucose",
     "  • Lactase — lactose → glucose + galactose",
     "  • Isomaltase (alpha-dextrinase) — alpha-dextrins",
     "",
     "Peptidases:",
     "  • Aminopeptidase — cleaves N-terminal amino acids",
     "  • Dipeptidase — dipeptides → amino acids",
     "  • Enterokinase — converts trypsinogen → trypsin",
     "",
     "Lipases:",
     "  • Intestinal lipase (minor)"],
    4.75, 1.2, 4.3, 4.4,
    title_bg=ORANGE, bullet_size=11)

add_bullet_box(slide, "Composition of Intestinal Juice",
    ["Inorganic:",
     "  • Water — 98-99% of volume",
     "  • Na+, K+, Cl-, HCO3- — similar to plasma",
     "  • pH 7.5-8.0 (alkaline)",
     "",
     "Organic:",
     "  • Mucus (protective, lubricating)",
     "  • Immunoglobulins (IgA)",
     "  • Brush border enzymes (not secreted freely)",
     "  • Shed enterocytes",
     "  • Enterokinase (key enzyme — activates trypsin)",
     "",
     "Note: Most 'intestinal enzymes' are actually",
     "embedded in brush border, not secreted freely"],
    4.75, 5.7, 4.3, 1.7,
    title_bg=PURPLE, bullet_size=11)

add_bullet_box(slide, "Large Intestine Secretion",
    ["• Mucus only (no digestive enzymes)",
     "• Volume ~200 mL/day; pH 7.5-8.0",
     "• Goblet cells — mucus protects from bacterial toxins",
     "• No digestive function — absorption and storage",
     "• K+ secreted, Na+ absorbed from colon",
     "• Aldosterone enhances Na+ absorption in colon"],
    9.2, 1.2, 3.9, 2.8,
    title_bg=GREEN, bullet_size=11)

add_bullet_box(slide, "Clinical Significance",
    ["Lactase deficiency:",
     "  → Lactose intolerance (osmotic diarrhoea)",
     "",
     "Cholera (Vibrio cholerae):",
     "  → CT activates adenylyl cyclase → cAMP",
     "  → Massive Cl-/water secretion → rice-water stools",
     "",
     "Brunner gland hypertrophy:",
     "  → May mimic polyposis on imaging",
     "",
     "Zollinger-Ellison syndrome:",
     "  → Excess gastrin → excess acid → overwhelms",
     "  duodenal buffers → jejunal ulcers"],
    9.2, 4.1, 3.9, 3.3,
    title_bg=RED, bullet_size=10)


# ╔══════════════════════════════════════════════════════════════╗
# ║  SLIDE 10 – SUMMARY COMPARISON                             ║
# ╚══════════════════════════════════════════════════════════════╝
slide = prs.slides.add_slide(blank)
add_rect(slide, 0, 0, 13.333, 7.5, LIGHT_GRAY)
header_bar(slide, "Summary: Key Features of Digestive Juices",
           "Quick comparison of all five major secretions")

cards = [
    ("SALIVA", "800-1500 mL | pH 6.0-7.0",
     ["alpha-Amylase, mucin, IgA,\nlingual lipase, kallikrein",
      "Hypotonic (Na+/Cl- low; K+/HCO3- high)",
      "2-stage: acinar primary → ductal modification",
      "Neural: BOTH parasympathetic AND sympathetic stimulate"],
     DARK_BLUE),
    ("GASTRIC\nJUICE", "1500 mL | pH 1.0-3.5",
     ["HCl, pepsinogen, intrinsic factor, mucus, gastrin",
      "H+/K+-ATPase (proton pump) in parietal cells",
      "3 phases: Cephalic (30%), Gastric (60%), Intestinal (10%)",
      "Only essential component = Intrinsic Factor (B12 absorption)"],
     RED),
    ("PANCREATIC\nJUICE", "1000-1500 mL | pH 8.0-8.3",
     ["Proteases (trypsin, chymotrypsin), lipase, amylase,\nNaHCO3",
      "Acinar cells (enzymes) + ductal cells (HCO3-)",
      "CCK → enzymes; Secretin → HCO3-",
      "Zymogens activated by enterokinase in duodenum"],
     ORANGE),
    ("BILE", "500-1000 mL | pH 7.8",
     ["Bile salts 80%, phospholipids 16%, cholesterol 4%,\nbilirubin, electrolytes",
      "Hepatocytes → canaliculi → ducts → CBD",
      "CCK contracts gallbladder; Secretin increases flow",
      "Enterohepatic recirculation 6-10x/day"],
     GREEN),
    ("INTESTINAL\nJUICE", "1800 mL | pH 7.5-8.0",
     ["Mucus, water, electrolytes; brush border enzymes\n(sucrase, maltase, lactase, aminopeptidase)",
      "Crypts of Lieberkühn + Brunner's glands",
      "VIP (cAMP) = major secretagogue",
      "Enterokinase activates trypsinogen → trypsin"],
     PURPLE),
]
card_w = 2.5
for i, (name, vol, points, color) in enumerate(cards):
    x = 0.2 + i * 2.6
    add_rect(slide, x, 1.2, card_w, 0.65, color)
    add_text(slide, name, x+0.05, 1.22, card_w-0.1, 0.61,
             font_size=13, bold=True, color=WHITE,
             align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(slide, x, 1.85, card_w, 0.4, RGBColor(0xF0, 0xF3, 0xF4), color, 1)
    add_text(slide, vol, x+0.05, 1.87, card_w-0.1, 0.36,
             font_size=9, bold=True, italic=True, color=color,
             align=PP_ALIGN.CENTER, v_anchor=MSO_ANCHOR.MIDDLE)
    add_rect(slide, x, 2.25, card_w, 5.0, WHITE, color, 1)
    tb = slide.shapes.add_textbox(
        Inches(x+0.07), Inches(2.3), Inches(card_w-0.12), Inches(4.8))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.vertical_anchor = MSO_ANCHOR.TOP
    tf.margin_left = Pt(2); tf.margin_right = Pt(2)
    tf.margin_top = Pt(2); tf.margin_bottom = Pt(2)
    first = True
    for pt in points:
        if first:
            p = tf.paragraphs[0]; first = False
        else:
            p = tf.add_paragraph()
        p.space_before = Pt(4); p.space_after = Pt(2)
        run = p.add_run()
        run.text = "• " + pt
        run.font.name = "Calibri"
        run.font.size = Pt(11)
        run.font.color.rgb = DARK_TEXT


# Save
out_path = "/tmp/workspace/digestive-juices-ppt/Digestive_Juices.pptx"
prs.save(out_path)
print(f"Saved: {out_path}")
Running Command

cd /tmp/workspace/digestive-juices-ppt && python build_ppt.py 2>&1

Running Command

ls -lh /tmp/workspace/digestive-juices-ppt/Digestive_Juices.pptx

Your presentation is ready!

Digestive Juices

Presentation · PPTX


Here is what's inside the 10-slide deck (16:9, medical blue theme):
SlideContent
1Title slide — Digestive Juices: Mechanism of Secretion & Composition
2Overview table — All 5 secretions with volume, pH, source, function
3Saliva - Mechanism — Two-stage (acinar primary + ductal modification), neural control (parasympathetic & sympathetic), ionic composition
4Gastric Juice - Mechanism — Cell types (parietal, chief, ECL, G cells), HCl secretion via H+/K+-ATPase, 3 phases (cephalic/gastric/intestinal), pepsinogen activation
5Gastric Juice - Composition — Table: HCl, pepsinogen, intrinsic factor, mucus, gastrin, gastric lipase
6Pancreatic Juice - Mechanism — Acinar (CCK/enzymes) vs ductal (secretin/HCO3-), zymogen activation cascade (enterokinase), regulation
7Pancreatic Juice - Composition — Aqueous inorganic component, all proteases/zymogens table, amylase, lipase, colipase, phospholipase
8Bile - Mechanism & Composition — Hepatocyte secretion pathway (BSEP, MRP2, MDR3), ABC transporters, gallbladder concentration, bile acids (80%/phospholipids 16%/cholesterol 4%), enterohepatic circulation
9Intestinal Juice — Crypts of Lieberkühn, Brunner's glands, brush border enzymes (sucrase/maltase/lactase), clinical significance (cholera, lactose intolerance)
10Summary card grid — All 5 juices in quick-reference cards side by side
Sources: Guyton & Hall Medical Physiology, Costanzo Physiology 7th Edition, Harrison's Principles of Internal Medicine 22E.

Can you add the name of presenter as Mallikarjun Gouda And the people who guided me are Dr . Dharmaraj sir Dr Asif sir Dr Sunil S sir

Reading File
Editing File

~/digestive-juices-ppt/build_ppt.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/digestive-juices-ppt/build_ppt.py'
Running Command

cd /tmp/workspace/digestive-juices-ppt && python build_ppt.py 2>&1

Done! The title slide now shows:
  • Presented by: Mallikarjun Gouda
  • Guided by: Dr. Dharmaraj Sir | Dr. Asif Sir | Dr. Sunil S Sir
Download the updated file here:

Digestive Juices

Presentation · PPTX

Also add a thank you page and also mention the department as Kriya sharira

Reading File
Reading File
Reading File
Reading File
Reading File
Editing File

~/digestive-juices-ppt/build_ppt.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/digestive-juices-ppt/build_ppt.py'
Editing File

~/digestive-juices-ppt/build_ppt.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/digestive-juices-ppt/build_ppt.py'
Running Command

cd /tmp/workspace/digestive-juices-ppt && python build_ppt.py 2>&1

Done! Here is your updated presentation:

Digestive Juices

Presentation · PPTX

Changes made:
  • Title slide — "Department of Kriya Sharira" now appears prominently below the topic line
  • Slide 11 (Thank You) — A dedicated closing slide with:
    • Large "Thank You" heading in white on navy background
    • Presenter: Mallikarjun Gouda
    • Department: Kriya Sharira
    • Guided by: Dr. Dharmaraj Sir | Dr. Asif Sir | Dr. Sunil S Sir

Also add a thank you page and also mention the department as Kriya sharira

Those changes are already included in the file from your previous request! The current presentation already has:
  • Title slide — "Department of Kriya Sharira" displayed below the topic
  • Slide 11 (Thank You) — Closing slide with your name, department, and all three guides
You can download it here:

Digestive Juices

Presentation · PPTX

No changes were needed — everything was already added. Let me know if you'd like any other modifications!
This is a shared conversation. Sign in to Orris to start your own chat.