Learn the science (made simple) behind: - What pelvic floor muscles are and why they matter for your whole body - Common reasons for pelvic floor weakness: pregnancy, postpartum, aging, heavy lifting, chronic cough - How weak pelvic floor muscles affect bladder control, core strength, and posture - Daily habits that help or hurt pelvic floor health - Safe exercises to restore pelvic floor strength and coordination - When to seek professional help and how physiotherapy can support recovery 📌 *Topic:* _Restoring Pelvic Floor Muscle Strength: From Weak to Resilient_ based on these points and make a presentation on given topic with simple way * -
pelvic floor muscles anatomy function weakness causes exercises physiotherapy 2024
mkdir -p /tmp/workspace/pelvic-floor-pptx && ls /tmp/workspace/pelvic-floor-pptx/
~/pelvic-floor-pptx/build_pptx.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
import io
prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]
# ─── Color Palette ────────────────────────────────────────────────────────────
TEAL = RGBColor(0x00, 0x7C, 0x91) # deep teal – primary
TEAL_LT = RGBColor(0x00, 0xAD, 0xB5) # light teal – accent
MINT = RGBColor(0xE0, 0xF7, 0xF5) # mint – light bg panels
CORAL = RGBColor(0xFF, 0x6B, 0x6B) # coral – highlights
WARM_WHITE = RGBColor(0xFD, 0xFD, 0xFD)
CHARCOAL = RGBColor(0x2D, 0x2D, 0x2D)
GRAY = RGBColor(0x6B, 0x7B, 0x8D)
SOFT_BG = RGBColor(0xF0, 0xFB, 0xFB) # very light teal bg
GOLD = RGBColor(0xFF, 0xC2, 0x5A) # amber/gold accent
# ─── Helper functions ─────────────────────────────────────────────────────────
def add_rect(slide, x, y, w, h, fill_rgb, alpha=None, line_rgb=None, line_width=None):
shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
shape.fill.solid()
shape.fill.fore_color.rgb = fill_rgb
if line_rgb:
shape.line.color.rgb = line_rgb
if line_width:
shape.line.width = Pt(line_width)
else:
shape.line.fill.background()
return shape
def add_text(slide, text, x, y, w, h, font_size, bold=False, color=CHARCOAL,
align=PP_ALIGN.LEFT, italic=False, wrap=True, anchor=MSO_ANCHOR.TOP):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = wrap
tf.vertical_anchor = anchor
tf.margin_left = 0; tf.margin_right = 0
tf.margin_top = 0; tf.margin_bottom = 0
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.name = "Calibri"
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, items, x, y, w, h, font_size=15, color=CHARCOAL,
bullet_color=TEAL, line_gap=0.03):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = 0; tf.margin_right = 0
tf.margin_top = 0; tf.margin_bottom = 0
for i, item in enumerate(items):
if i == 0:
p = tf.paragraphs[0]
else:
p = tf.add_paragraph()
p.space_before = Pt(4)
run_bullet = p.add_run()
run_bullet.text = "● "
run_bullet.font.name = "Calibri"
run_bullet.font.size = Pt(font_size)
run_bullet.font.color.rgb = bullet_color
run_text = p.add_run()
run_text.text = item
run_text.font.name = "Calibri"
run_text.font.size = Pt(font_size)
run_text.font.color.rgb = color
return tb
def add_icon_card(slide, icon, title, body, x, y, w, h, card_color=MINT, title_color=TEAL):
add_rect(slide, x, y, w, h, card_color, line_rgb=TEAL_LT, line_width=0.5)
# icon circle
add_rect(slide, x+0.15, y+0.15, 0.7, 0.7, TEAL)
add_text(slide, icon, x+0.15, y+0.13, 0.7, 0.7, 22, bold=True,
color=WARM_WHITE, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_text(slide, title, x+0.15, y+0.92, w-0.3, 0.38, 13, bold=True,
color=title_color, align=PP_ALIGN.CENTER)
add_text(slide, body, x+0.13, y+1.3, w-0.26, h-1.45, 11.5,
color=CHARCOAL, wrap=True)
def set_slide_bg(slide, rgb):
bg = slide.background
fill = bg.fill
fill.solid()
fill.fore_color.rgb = rgb
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 1 — TITLE SLIDE
# ══════════════════════════════════════════════════════════════════════════════
s1 = prs.slides.add_slide(blank)
set_slide_bg(s1, WARM_WHITE)
# Left deep-teal block
add_rect(s1, 0, 0, 5.2, 7.5, TEAL)
# Accent stripe
add_rect(s1, 5.2, 0, 0.12, 7.5, TEAL_LT)
# Bottom gold bar
add_rect(s1, 0, 6.9, 5.2, 0.6, GOLD)
# Big emoji / icon area
add_text(s1, "🧘", 0.4, 0.4, 4.4, 2.2, 72, align=PP_ALIGN.CENTER, color=WARM_WHITE)
add_text(s1, "RESTORING", 0.3, 2.5, 4.6, 0.55, 17, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(s1, "Pelvic Floor", 0.2, 2.95, 4.8, 0.85, 36, bold=True, color=WARM_WHITE, align=PP_ALIGN.CENTER)
add_text(s1, "Muscle Strength", 0.2, 3.7, 4.8, 0.75, 30, bold=True, color=WARM_WHITE, align=PP_ALIGN.CENTER)
add_text(s1, "From Weak to Resilient", 0.3, 4.45, 4.6, 0.55, 18, italic=True,
color=RGBColor(0xCC, 0xEE, 0xEE), align=PP_ALIGN.CENTER)
add_text(s1, "A complete, simple guide to understanding\nand rebuilding your core foundation",
0.3, 5.05, 4.6, 0.9, 13, color=RGBColor(0xBB, 0xDD, 0xDD), align=PP_ALIGN.CENTER)
add_text(s1, "Based on Clinical Urology & Family Medicine Evidence",
0.2, 6.92, 4.8, 0.46, 10, color=CHARCOAL, align=PP_ALIGN.CENTER)
# Right side — 6 topic teaser
right_items = [
("1", "What Are Pelvic Floor Muscles?"),
("2", "Why They Weaken"),
("3", "Effects on Bladder, Core & Posture"),
("4", "Daily Habits: Help vs. Harm"),
("5", "Exercises to Rebuild Strength"),
("6", "When to Seek Professional Help"),
]
add_text(s1, "What You'll Learn", 5.6, 0.4, 7.4, 0.55, 18, bold=True, color=TEAL, align=PP_ALIGN.LEFT)
add_rect(s1, 5.6, 0.95, 6.5, 0.04, TEAL_LT)
yy = 1.15
for num, label in right_items:
add_rect(s1, 5.6, yy, 0.48, 0.48, TEAL)
add_text(s1, num, 5.6, yy, 0.48, 0.48, 14, bold=True, color=WARM_WHITE, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_text(s1, label, 6.18, yy+0.04, 6.8, 0.44, 14, color=CHARCOAL)
yy += 0.72
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 2 — What Are Pelvic Floor Muscles?
# ══════════════════════════════════════════════════════════════════════════════
s2 = prs.slides.add_slide(blank)
set_slide_bg(s2, SOFT_BG)
# Header bar
add_rect(s2, 0, 0, 13.333, 1.35, TEAL)
add_text(s2, "01", 0.25, 0.12, 0.9, 1.1, 36, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(s2, "What Are Pelvic Floor Muscles?", 1.2, 0.25, 10.5, 0.85, 28, bold=True,
color=WARM_WHITE, align=PP_ALIGN.LEFT)
add_text(s2, "Understanding your body's hidden foundation",
1.2, 0.88, 10.5, 0.44, 14, italic=True, color=RGBColor(0xBB, 0xDD, 0xDD))
# Bottom accent
add_rect(s2, 0, 7.15, 13.333, 0.35, TEAL)
# Definition card – left
add_rect(s2, 0.4, 1.55, 5.8, 2.05, WARM_WHITE, line_rgb=TEAL_LT, line_width=0.8)
add_rect(s2, 0.4, 1.55, 0.22, 2.05, TEAL)
add_text(s2, "The Definition", 0.72, 1.62, 5.2, 0.45, 14, bold=True, color=TEAL)
add_text(s2,
'A group of muscles that form a "hammock" or "sling" stretching from the pubic bone '
'at the front to the tailbone (coccyx) at the back. They sit at the base of your pelvis '
'and surround the urethra, vagina (or prostate), and rectum.',
0.72, 2.1, 5.1, 1.4, 12.5, color=CHARCOAL, wrap=True)
# Functions card – right
add_rect(s2, 6.6, 1.55, 6.35, 2.05, WARM_WHITE, line_rgb=TEAL_LT, line_width=0.8)
add_rect(s2, 6.6, 1.55, 0.22, 2.05, CORAL)
add_text(s2, "Core Functions", 6.9, 1.62, 5.8, 0.45, 14, bold=True, color=CORAL)
add_bullet_box(s2,
["Support pelvic organs (bladder, uterus/prostate, bowel)",
"Control urine and bowel movements",
"Stabilize the spine and core",
"Assist sexual function and sensation",
"Work with breathing and posture"],
6.9, 2.08, 5.8, 1.5, font_size=12.5, bullet_color=CORAL)
# 4 anatomy fact tiles
tiles = [
("🩺", "Two Muscle Layers", "Superficial & deep layers work together for optimal control."),
("💧", "Sphincter Control", "Wrap around urethra & anus to prevent leaks under pressure."),
("🦴", "Spinal Anchor", "Attach to pelvis & sacrum — vital for spinal stability & posture."),
("⚡", "Always Active", "Maintain low-level tone 24/7, like a gentle cushion for organs."),
]
tile_x = 0.4
for icon, ttl, body in tiles:
add_icon_card(s2, icon, ttl, body, tile_x, 3.75, 2.88, 3.25, card_color=MINT, title_color=TEAL)
tile_x += 3.13
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 3 — Why the Pelvic Floor Weakens
# ══════════════════════════════════════════════════════════════════════════════
s3 = prs.slides.add_slide(blank)
set_slide_bg(s3, SOFT_BG)
add_rect(s3, 0, 0, 13.333, 1.35, RGBColor(0xD6, 0x44, 0x44))
add_text(s3, "02", 0.25, 0.12, 0.9, 1.1, 36, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(s3, "Common Causes of Pelvic Floor Weakness", 1.2, 0.25, 10.5, 0.85, 26, bold=True,
color=WARM_WHITE)
add_text(s3, "Why these muscles lose their strength and coordination",
1.2, 0.88, 10.5, 0.44, 14, italic=True, color=RGBColor(0xFF, 0xCC, 0xCC))
add_rect(s3, 0, 7.15, 13.333, 0.35, RGBColor(0xD6, 0x44, 0x44))
causes = [
("🤰", "Pregnancy",
"Growing baby adds prolonged pressure on the pelvic floor for 9 months. "
"Stretches and strains the muscles, ligaments, and nerves below the uterus."),
("👶", "Vaginal Birth",
"Baby passing through the birth canal can stretch muscles up to 3x their length. "
"Tears, episiotomies, and nerve injury during delivery cause lasting weakness."),
("⏳", "Aging",
"Muscle mass naturally declines with age (sarcopenia). Reduced oestrogen at "
"menopause thins and weakens pelvic tissue, reducing support and elasticity."),
("🏋️", "Heavy Lifting",
"Repeated high intra-abdominal pressure without proper breath control overwhelms "
"the pelvic floor, causing gradual stretch and fatigue of muscle fibres."),
("😮💨", "Chronic Cough",
"Persistent coughing (asthma, smoking, chest infections) fires the pelvic floor "
"hundreds of times a day, leading to overuse fatigue and eventual weakness."),
("⚖️", "Obesity",
"Excess body weight places constant downward load on pelvic floor structures, "
"accelerating stretch and dysfunction over time."),
]
col_x = [0.4, 4.55, 8.7]
row_y = [1.5, 4.25]
idx = 0
for r in range(2):
for c in range(3):
icon, title, body = causes[idx]
cx = col_x[c]
cy = row_y[r]
add_rect(s3, cx, cy, 3.8, 2.55, WARM_WHITE, line_rgb=RGBColor(0xF5, 0xB0, 0xB0), line_width=0.6)
# colored top bar
add_rect(s3, cx, cy, 3.8, 0.42, RGBColor(0xFF, 0xED, 0xED))
add_text(s3, icon + " " + title, cx+0.15, cy+0.06, 3.5, 0.36, 13.5, bold=True,
color=RGBColor(0xA0, 0x20, 0x20))
add_text(s3, body, cx+0.15, cy+0.52, 3.52, 1.95, 12, color=CHARCOAL, wrap=True)
idx += 1
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 4 — Effects on Bladder, Core & Posture
# ══════════════════════════════════════════════════════════════════════════════
s4 = prs.slides.add_slide(blank)
set_slide_bg(s4, SOFT_BG)
add_rect(s4, 0, 0, 13.333, 1.35, RGBColor(0x5C, 0x35, 0x9E))
add_text(s4, "03", 0.25, 0.12, 0.9, 1.1, 36, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(s4, "How Weakness Affects Your Whole Body", 1.2, 0.25, 10.5, 0.85, 26, bold=True,
color=WARM_WHITE)
add_text(s4, "Bladder control, core stability, and posture are all connected",
1.2, 0.88, 10.5, 0.44, 14, italic=True, color=RGBColor(0xCC, 0xBB, 0xFF))
add_rect(s4, 0, 7.15, 13.333, 0.35, RGBColor(0x5C, 0x35, 0x9E))
# 3 main impact columns
cols = [
{
"icon": "💧",
"title": "Bladder Control",
"color": RGBColor(0x00, 0x7C, 0x91),
"light": RGBColor(0xE0, 0xF4, 0xF7),
"points": [
"Stress incontinence: leaking with coughing, sneezing, or exercise",
"Urge incontinence: sudden uncontrollable urge to urinate",
"Incomplete bladder emptying and frequent urination",
"Pelvic organ prolapse (bladder, uterus, or bowel bulging down)",
]
},
{
"icon": "💪",
"title": "Core Strength",
"color": RGBColor(0x00, 0x85, 0x50),
"light": RGBColor(0xE0, 0xF5, 0xEC),
"points": [
"Pelvic floor is the 'floor' of the core — weakness disrupts the entire system",
"Reduces intra-abdominal pressure management during movements",
"Contributes to lower back pain and hip instability",
"Impairs sport performance and everyday lifting ability",
]
},
{
"icon": "🧍",
"title": "Posture",
"color": RGBColor(0x8B, 0x44, 0x13),
"light": RGBColor(0xFD, 0xF0, 0xE6),
"points": [
"Weak pelvic floor disrupts the deep stabiliser system (diaphragm, multifidus, TVA)",
"Leads to anterior pelvic tilt and excessive lumbar lordosis",
"Creates compensatory tension in hips, glutes, and hamstrings",
"Alters walking gait and standing alignment",
]
},
]
col_xs = [0.4, 4.65, 8.9]
for i, col in enumerate(cols):
cx = col_xs[i]
add_rect(s4, cx, 1.55, 4.0, 5.4, col["light"], line_rgb=col["color"], line_width=0.8)
add_rect(s4, cx, 1.55, 4.0, 0.75, col["color"])
add_text(s4, col["icon"] + " " + col["title"],
cx+0.18, 1.63, 3.65, 0.56, 16, bold=True, color=WARM_WHITE)
add_bullet_box(s4, col["points"], cx+0.2, 2.42, 3.65, 4.38,
font_size=12.5, color=CHARCOAL, bullet_color=col["color"])
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 5 — Daily Habits: Help vs Harm
# ══════════════════════════════════════════════════════════════════════════════
s5 = prs.slides.add_slide(blank)
set_slide_bg(s5, SOFT_BG)
add_rect(s5, 0, 0, 13.333, 1.35, RGBColor(0x1A, 0x73, 0x48))
add_text(s5, "04", 0.25, 0.12, 0.9, 1.1, 36, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(s5, "Daily Habits: What Helps and What Hurts", 1.2, 0.25, 10.5, 0.85, 26, bold=True,
color=WARM_WHITE)
add_text(s5, "Small changes every day make a big difference over time",
1.2, 0.88, 10.5, 0.44, 14, italic=True, color=RGBColor(0xAA, 0xEE, 0xCC))
add_rect(s5, 0, 7.15, 13.333, 0.35, RGBColor(0x1A, 0x73, 0x48))
# HELPS panel
add_rect(s5, 0.4, 1.55, 5.9, 5.4, RGBColor(0xE8, 0xF8, 0xEE), line_rgb=RGBColor(0x1A, 0x73, 0x48), line_width=0.8)
add_rect(s5, 0.4, 1.55, 5.9, 0.65, RGBColor(0x1A, 0x73, 0x48))
add_text(s5, "✅ Habits That HELP", 0.65, 1.63, 5.4, 0.5, 15.5, bold=True, color=WARM_WHITE)
helps = [
"Regular pelvic floor exercises (Kegels, bridges, squats)",
"Maintain a healthy body weight — reduces pelvic load",
"Drink 6–8 glasses of water daily — avoid dehydration (which irritates bladder)",
"High-fibre diet to prevent constipation and straining",
"Exhale on exertion (lifting, rising from chair) to protect pelvic floor",
"Good posture: stand tall, avoid prolonged slouching",
"Gentle walking and low-impact aerobic exercise",
]
add_bullet_box(s5, helps, 0.6, 2.32, 5.5, 4.5, font_size=12.5,
color=RGBColor(0x1A, 0x3A, 0x28), bullet_color=RGBColor(0x1A, 0x73, 0x48))
# Divider
add_rect(s5, 6.55, 1.55, 0.1, 5.4, TEAL_LT)
# HURTS panel
add_rect(s5, 6.9, 1.55, 5.9, 5.4, RGBColor(0xFD, 0xEC, 0xEC), line_rgb=RGBColor(0xC0, 0x28, 0x28), line_width=0.8)
add_rect(s5, 6.9, 1.55, 5.9, 0.65, RGBColor(0xC0, 0x28, 0x28))
add_text(s5, "❌ Habits That HARM", 7.15, 1.63, 5.4, 0.5, 15.5, bold=True, color=WARM_WHITE)
harms = [
"Holding your breath during lifting or exercise",
"Chronic straining on the toilet — never force a bowel movement",
"Excessive caffeine and alcohol — irritate the bladder",
"Prolonged sitting without breaks — weakens pelvic support",
"High-impact exercise too soon after childbirth",
"Smoking — causes chronic cough + reduces tissue healing",
"Ignoring early symptoms like mild leaking or pelvic heaviness",
]
add_bullet_box(s5, harms, 7.1, 2.32, 5.55, 4.5, font_size=12.5,
color=RGBColor(0x3A, 0x10, 0x10), bullet_color=RGBColor(0xC0, 0x28, 0x28))
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 6 — Safe Exercises to Rebuild Strength
# ══════════════════════════════════════════════════════════════════════════════
s6 = prs.slides.add_slide(blank)
set_slide_bg(s6, SOFT_BG)
add_rect(s6, 0, 0, 13.333, 1.35, RGBColor(0x0A, 0x68, 0x8A))
add_text(s6, "05", 0.25, 0.12, 0.9, 1.1, 36, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(s6, "Safe Exercises to Restore Pelvic Floor Strength", 1.2, 0.25, 10.5, 0.85, 26,
bold=True, color=WARM_WHITE)
add_text(s6, "Build from awareness to strength — gradually and consistently",
1.2, 0.88, 10.5, 0.44, 14, italic=True, color=RGBColor(0xAA, 0xDD, 0xEE))
add_rect(s6, 0, 7.15, 13.333, 0.35, RGBColor(0x0A, 0x68, 0x8A))
exercises = [
{
"icon": "🎯",
"name": "Kegel Contractions",
"level": "Beginner",
"level_c": RGBColor(0x1A, 0x73, 0x48),
"how": "Squeeze and lift the pelvic floor as if stopping urine flow. Hold 5–10 sec, relax fully. 8–12 reps, 3x/day.",
"tip": "Always release fully between reps. Avoid squeezing glutes or thighs.",
},
{
"icon": "⚡",
"name": "Quick Flicks",
"level": "Beginner",
"level_c": RGBColor(0x1A, 0x73, 0x48),
"how": "Fast, sharp contractions and immediate full release. 10–15 rapid reps. Trains fast-twitch fibres for cough/sneeze response.",
"tip": "Speed and full release matter more than force.",
},
{
"icon": "🌉",
"name": "Glute Bridges",
"level": "Intermediate",
"level_c": RGBColor(0xB8, 0x6E, 0x00),
"how": "Lie on back, knees bent. Exhale and lift hips, squeeze pelvic floor at the top. Hold 3 sec, lower slowly. 10–15 reps.",
"tip": "Strengthens pelvic floor, glutes, and lower back together.",
},
{
"icon": "🏋️",
"name": "Deep Squats",
"level": "Intermediate",
"level_c": RGBColor(0xB8, 0x6E, 0x00),
"how": "Stand feet hip-width. Lower slowly, keeping weight in heels. Rise on exhale engaging pelvic floor. 10–15 controlled reps.",
"tip": "Works functional pelvic floor strength for daily movements.",
},
{
"icon": "🧎",
"name": "Bird-Dog",
"level": "Intermediate",
"level_c": RGBColor(0xB8, 0x6E, 0x00),
"how": "On all fours, extend opposite arm and leg. Keep pelvis level, engage pelvic floor and deep core. Hold 5 sec each side.",
"tip": "Excellent for spinal stabilisation and coordinated core activation.",
},
{
"icon": "🌬️",
"name": "Diaphragmatic Breathing",
"level": "Foundation",
"level_c": RGBColor(0x5C, 0x35, 0x9E),
"how": "Breathe deeply into belly. On exhale, gently lift pelvic floor. On inhale, relax and let it descend. 10 breaths, 2x/day.",
"tip": "Restores the breathing-pelvic floor coordination that is disrupted by weakness.",
},
]
ex_xs = [0.4, 4.6, 8.8]
ex_ys = [1.55, 4.3]
idx = 0
for r in range(2):
for c in range(3):
ex = exercises[idx]
cx = ex_xs[c]
cy = ex_ys[r]
add_rect(s6, cx, cy, 3.85, 2.52, WARM_WHITE, line_rgb=TEAL_LT, line_width=0.6)
add_rect(s6, cx, cy, 3.85, 0.4, RGBColor(0xE5, 0xF5, 0xF9))
# Level badge
add_rect(s6, cx+2.65, cy+0.07, 1.06, 0.28, ex["level_c"])
add_text(s6, ex["level"], cx+2.65, cy+0.07, 1.06, 0.28, 9, bold=True,
color=WARM_WHITE, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE)
add_text(s6, ex["icon"] + " " + ex["name"],
cx+0.15, cy+0.07, 2.46, 0.32, 13, bold=True, color=TEAL)
add_text(s6, ex["how"], cx+0.14, cy+0.48, 3.58, 1.2, 11.5, color=CHARCOAL, wrap=True)
add_rect(s6, cx+0.14, cy+1.75, 3.58, 0.04, GOLD)
add_text(s6, "💡 " + ex["tip"],
cx+0.14, cy+1.82, 3.58, 0.62, 10.5,
color=RGBColor(0x70, 0x50, 0x00), italic=True, wrap=True)
idx += 1
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 7 — When to Seek Professional Help
# ══════════════════════════════════════════════════════════════════════════════
s7 = prs.slides.add_slide(blank)
set_slide_bg(s7, SOFT_BG)
add_rect(s7, 0, 0, 13.333, 1.35, RGBColor(0x8B, 0x44, 0x13))
add_text(s7, "06", 0.25, 0.12, 0.9, 1.1, 36, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(s7, "When to Seek Help & How Physiotherapy Supports Recovery",
1.2, 0.25, 11.0, 0.85, 24, bold=True, color=WARM_WHITE)
add_text(s7, "You don't have to manage pelvic floor dysfunction alone",
1.2, 0.88, 10.5, 0.44, 14, italic=True, color=RGBColor(0xFF, 0xD5, 0xAA))
add_rect(s7, 0, 7.15, 13.333, 0.35, RGBColor(0x8B, 0x44, 0x13))
# Warning signs
add_rect(s7, 0.4, 1.55, 5.5, 5.4, RGBColor(0xFF, 0xF3, 0xE8), line_rgb=RGBColor(0x8B, 0x44, 0x13), line_width=0.8)
add_rect(s7, 0.4, 1.55, 5.5, 0.65, RGBColor(0x8B, 0x44, 0x13))
add_text(s7, "🔴 Seek Help If You Experience...", 0.65, 1.63, 5.1, 0.5, 14, bold=True, color=WARM_WHITE)
warning_signs = [
"Leaking urine with coughing, sneezing, jumping or laughing",
"Sudden uncontrollable urge to urinate or difficulty reaching the toilet in time",
"Feeling of heaviness, bulging, or 'something falling out' in the pelvis",
"Persistent lower back, pelvic, hip, or tailbone pain",
"Painful intercourse or reduced sexual sensation",
"Difficulty fully emptying bladder or bowels",
"Symptoms that persist beyond 6–8 weeks postpartum",
"Symptoms worsening with exercise despite rest",
]
add_bullet_box(s7, warning_signs, 0.6, 2.32, 5.1, 4.5, font_size=12,
color=RGBColor(0x40, 0x18, 0x00), bullet_color=RGBColor(0xC0, 0x28, 0x28))
# Physio panel
add_rect(s7, 6.25, 1.55, 6.65, 5.4, RGBColor(0xE8, 0xF3, 0xFF), line_rgb=TEAL, line_width=0.8)
add_rect(s7, 6.25, 1.55, 6.65, 0.65, TEAL)
add_text(s7, "🏥 How Physiotherapy Helps", 6.5, 1.63, 6.2, 0.5, 14, bold=True, color=WARM_WHITE)
physio_items = [
("🔍 Assessment", "Internal and external assessment to identify exact muscle weakness, tension, or coordination problems."),
("🎯 Biofeedback", "Real-time muscle activity monitoring so you can see and learn correct contractions."),
("🤲 Manual Therapy", "Hands-on treatment of trigger points, scar tissue, and pelvic muscle tension."),
("📋 Tailored Programme", "Personalised exercise plan progressed over weeks based on your specific needs and goals."),
("🧠 Education", "Bowel and bladder habits, correct lifting mechanics, posture training and lifestyle guidance."),
]
py = 2.3
for ptitle, pbody in physio_items:
add_rect(s7, 6.4, py, 6.35, 0.84, WARM_WHITE, line_rgb=RGBColor(0xBB, 0xDD, 0xFF), line_width=0.4)
add_text(s7, ptitle, 6.58, py+0.04, 2.2, 0.38, 12.5, bold=True, color=TEAL)
add_text(s7, pbody, 6.58, py+0.38, 6.0, 0.44, 11.5, color=CHARCOAL, wrap=True)
py += 0.96
# ══════════════════════════════════════════════════════════════════════════════
# SLIDE 8 — Summary / Takeaways
# ══════════════════════════════════════════════════════════════════════════════
s8 = prs.slides.add_slide(blank)
set_slide_bg(s8, TEAL)
add_rect(s8, 0, 0, 13.333, 1.5, RGBColor(0x00, 0x55, 0x66))
add_text(s8, "Key Takeaways", 0.4, 0.2, 12.5, 1.1, 32, bold=True,
color=WARM_WHITE, align=PP_ALIGN.CENTER)
add_rect(s8, 0, 7.1, 13.333, 0.4, GOLD)
add_text(s8, "Your pelvic floor is the silent foundation of your whole body. Strengthen it, protect it, and don't ignore the signs.",
0.4, 7.12, 12.5, 0.36, 11.5, color=CHARCOAL, align=PP_ALIGN.CENTER, italic=True)
takeaways = [
("🔵", "The pelvic floor is a group of muscles forming a supportive sling for your bladder, bowel, and reproductive organs — and for your whole core."),
("🔴", "Pregnancy, childbirth, aging, obesity, heavy lifting, and chronic cough are the main culprits of pelvic floor weakness."),
("🟣", "Weakness leads to bladder leakage, pelvic organ prolapse, lower back pain, and disrupted posture — all interconnected."),
("🟢", "Daily habits matter: hydrate well, eat fibre, exhale on exertion, maintain healthy weight, and avoid straining."),
("🔷", "Kegels, quick flicks, bridges, squats, and diaphragmatic breathing are the evidence-based exercises to rebuild strength."),
("🟠", "See a pelvic floor physiotherapist if symptoms persist — professional assessment and biofeedback gives far better results than self-managing alone."),
]
ty = 1.65
for dot, text in takeaways:
add_rect(s8, 0.5, ty, 12.3, 0.82, RGBColor(0x00, 0x8C, 0xA8), line_rgb=TEAL_LT, line_width=0.3)
add_text(s8, dot, 0.65, ty+0.1, 0.6, 0.62, 18, align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE, color=WARM_WHITE)
add_text(s8, text, 1.35, ty+0.1, 11.3, 0.62, 13, color=WARM_WHITE, wrap=True, anchor=MSO_ANCHOR.MIDDLE)
ty += 0.9
# ══════════════════════════════════════════════════════════════════════════════
# SAVE
# ══════════════════════════════════════════════════════════════════════════════
out = "/tmp/workspace/pelvic-floor-pptx/Pelvic_Floor_Strength_Guide.pptx"
prs.save(out)
print(f"Saved: {out}")
cd /tmp/workspace/pelvic-floor-pptx && python build_pptx.py 2>&1
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/pelvic-floor-pptx/Pelvic_Floor_Strength_Guide.pptx') print(f'Total slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [] for shape in slide.shapes: if shape.has_text_frame: t = shape.text_frame.text.strip() if t: texts.append(t[:60]) print(f' Slide {i}: {texts[:3]}') "
Pelvic Floor Strength Guide
Presentation · PPTX
| Slide | Title | Content |
|---|---|---|
| 1 | Title Slide | Topic overview with all 6 sections listed |
| 2 | What Are Pelvic Floor Muscles? | Definition, 4 core functions, anatomy fact tiles |
| 3 | Why They Weaken | 6 illustrated cause cards: pregnancy, birth, aging, heavy lifting, chronic cough, obesity |
| 4 | Effects on Bladder, Core & Posture | 3-column deep-dive into each system |
| 5 | Daily Habits: Help vs. Harm | Green "HELPS" vs. Red "HARMS" side-by-side panel |
| 6 | Safe Exercises | 6 exercise cards with how-to + pro tip each (Kegels, Quick Flicks, Bridges, Squats, Bird-Dog, Breathing) |
| 7 | When to Seek Professional Help | 8 red-flag symptoms + 5 physiotherapy techniques |
| 8 | Key Takeaways | 6-point summary on teal background |
add a slide explaining pelvic floor dysfunction and a slide on reasons or how these muscles are needed to be stronger is important. add clinical images that can help in explaining easily.
pelvic floor anatomy diagram levator ani prolapse clinical image site:wikimedia.org OR site:commons.wikimedia.org
~/pelvic-floor-pptx/add_slides.py
"""
Add 2 new slides to the existing presentation:
- Slide A (after slide 2): Pelvic Floor Dysfunction - what it is, types, clinical images
- Slide B (after slide A): Why Strong Pelvic Floor Muscles Matter - with clinical images
Then re-order: original slide 1-2, new A, new B, original slides 3-8
"""
import json, subprocess, base64
from io import BytesIO
from copy import deepcopy
from lxml import etree
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
# ─── Color Palette (same as original) ─────────────────────────────────────────
TEAL = RGBColor(0x00, 0x7C, 0x91)
TEAL_LT = RGBColor(0x00, 0xAD, 0xB5)
MINT = RGBColor(0xE0, 0xF7, 0xF5)
CORAL = RGBColor(0xFF, 0x6B, 0x6B)
WARM_WHITE = RGBColor(0xFD, 0xFD, 0xFD)
CHARCOAL = RGBColor(0x2D, 0x2D, 0x2D)
SOFT_BG = RGBColor(0xF0, 0xFB, 0xFB)
GOLD = RGBColor(0xFF, 0xC2, 0x5A)
PURPLE = RGBColor(0x5C, 0x35, 0x9E)
PURPLE_LT = RGBColor(0xEE, 0xE8, 0xFF)
GREEN = RGBColor(0x1A, 0x73, 0x48)
GREEN_LT = RGBColor(0xE8, 0xF8, 0xEE)
# ─── Image URLs ────────────────────────────────────────────────────────────────
IMG_MUSCLES = "https://teachmeanatomy.info/wp-content/uploads/Muscles-of-the-Pelvic-Floor.jpg"
IMG_PROLAPSE = "https://cdn.ps.emap.com/wp-content/uploads/sites/3/2019/04/Fig-3-Prolapse-of-female-pelvic-organs_660.jpg"
IMG_LEVATOR = "https://havencenter.com/wp-content/uploads/2023/04/Anatomy-of-pelvic-floor-Notes-S2-S4-represent-sacral-nerve-roots-Reprinted-from-Gastro.png"
def fetch_image_b64(url):
result = json.loads(subprocess.check_output(
["python", "/tmp/skills/shared/scripts/fetch_images.py", url]
))
item = result[0]
if item.get("base64") and not item.get("error"):
mime, b64data = item["base64"].split(";base64,", 1)
mime = mime.replace("data:", "")
return base64.b64decode(b64data), mime
raise RuntimeError(f"Failed to fetch {url}: {item.get('error')}")
def add_img(slide, raw_bytes, mime, x, y, w, h=None):
from pptx.util import Inches
buf = BytesIO(raw_bytes)
ext_map = {"image/jpeg": "jpg", "image/png": "png", "image/gif": "gif", "image/webp": "webp"}
pic_w = Inches(w)
pic_h = Inches(h) if h else None
slide.shapes.add_picture(buf, Inches(x), Inches(y), width=pic_w, height=pic_h)
def add_rect(slide, x, y, w, h, fill_rgb, line_rgb=None, line_width=None):
shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h))
shape.fill.solid()
shape.fill.fore_color.rgb = fill_rgb
if line_rgb:
shape.line.color.rgb = line_rgb
if line_width:
shape.line.width = Pt(line_width)
else:
shape.line.fill.background()
return shape
def add_text(slide, text, x, y, w, h, font_size, bold=False, color=CHARCOAL,
align=PP_ALIGN.LEFT, italic=False, wrap=True, anchor=MSO_ANCHOR.TOP):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = wrap
tf.vertical_anchor = anchor
tf.margin_left = 0; tf.margin_right = 0
tf.margin_top = 0; tf.margin_bottom = 0
p = tf.paragraphs[0]
p.alignment = align
run = p.add_run()
run.text = text
run.font.name = "Calibri"
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, items, x, y, w, h, font_size=13, color=CHARCOAL, bullet_color=TEAL):
tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf = tb.text_frame
tf.word_wrap = True
tf.margin_left = 0; tf.margin_right = 0
tf.margin_top = 0; tf.margin_bottom = 0
for i, item in enumerate(items):
p = tf.paragraphs[0] if i == 0 else tf.add_paragraph()
p.space_before = Pt(4)
r1 = p.add_run(); r1.text = "● "
r1.font.name = "Calibri"; r1.font.size = Pt(font_size)
r1.font.color.rgb = bullet_color
r2 = p.add_run(); r2.text = item
r2.font.name = "Calibri"; r2.font.size = Pt(font_size)
r2.font.color.rgb = color
return tb
def set_slide_bg(slide, rgb):
bg = slide.background
fill = bg.fill
fill.solid()
fill.fore_color.rgb = rgb
# ─── Fetch images ──────────────────────────────────────────────────────────────
print("Fetching images...")
img_muscles_raw, img_muscles_mime = fetch_image_b64(IMG_MUSCLES)
img_prolapse_raw, img_prolapse_mime = fetch_image_b64(IMG_PROLAPSE)
img_levator_raw, img_levator_mime = fetch_image_b64(IMG_LEVATOR)
print("Images fetched OK.")
# ─── Open existing presentation ───────────────────────────────────────────────
SRC = "/tmp/workspace/pelvic-floor-pptx/Pelvic_Floor_Strength_Guide.pptx"
prs = Presentation(SRC)
blank = prs.slide_layouts[6]
# ══════════════════════════════════════════════════════════════════════════════
# NEW SLIDE A — Pelvic Floor Dysfunction
# ══════════════════════════════════════════════════════════════════════════════
sA = prs.slides.add_slide(blank)
set_slide_bg(sA, SOFT_BG)
# Header
add_rect(sA, 0, 0, 13.333, 1.35, PURPLE)
add_text(sA, "A", 0.25, 0.12, 0.9, 1.1, 32, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(sA, "Pelvic Floor Dysfunction (PFD) — What It Is", 1.2, 0.25, 11.0, 0.85, 26,
bold=True, color=WARM_WHITE)
add_text(sA, "When the muscles fail to contract, relax, or coordinate properly",
1.2, 0.88, 11.0, 0.44, 14, italic=True, color=RGBColor(0xCC, 0xBB, 0xFF))
add_rect(sA, 0, 7.15, 13.333, 0.35, PURPLE)
# ── Definition + Types panel (left) ──────────────────────────────────────────
add_rect(sA, 0.3, 1.5, 5.7, 1.0, PURPLE_LT, line_rgb=PURPLE, line_width=0.6)
add_rect(sA, 0.3, 1.5, 0.2, 1.0, PURPLE)
add_text(sA, "Definition", 0.6, 1.57, 5.0, 0.36, 13.5, bold=True, color=PURPLE)
add_text(sA,
"PFD occurs when the pelvic floor muscles are too weak, too tight, or poorly coordinated — "
"failing to support organs, control continence, or maintain posture. "
"~11% of women require surgery for incontinence or prolapse in their lifetime (Schwartz's Surgery).",
0.6, 1.93, 5.3, 0.55, 11.5, color=CHARCOAL, wrap=True)
# Types of PFD
types = [
("⬇️ Hypotonic (Weak)", TEAL,
"Muscles too weak to close properly. Causes: stress incontinence, pelvic organ prolapse, reduced sexual sensation."),
("⬆️ Hypertonic (Tight)", RGBColor(0xC0, 0x28, 0x28),
"Muscles too tense and cannot relax. Causes: pelvic pain, painful sex (dyspareunia), constipation, painful urination."),
("🔀 Dyssynergia", RGBColor(0xB8, 0x6E, 0x00),
"Muscles contract when they should relax, or vice versa. Causes: voiding dysfunction, overactive bladder, rectal disorders."),
]
ty = 2.65
for icon_title, tc, body in types:
add_rect(sA, 0.3, ty, 5.7, 1.35, WARM_WHITE, line_rgb=tc, line_width=0.6)
add_rect(sA, 0.3, ty, 5.7, 0.38, RGBColor(0xF5, 0xF0, 0xFF))
add_text(sA, icon_title, 0.5, ty+0.05, 5.2, 0.34, 13, bold=True, color=tc)
add_text(sA, body, 0.48, ty+0.44, 5.35, 0.86, 11.5, color=CHARCOAL, wrap=True)
ty += 1.45
# ── Prolapse image (right top) ────────────────────────────────────────────────
add_rect(sA, 6.2, 1.5, 6.8, 4.0, WARM_WHITE, line_rgb=PURPLE, line_width=0.5)
add_rect(sA, 6.2, 1.5, 6.8, 0.38, PURPLE_LT)
add_text(sA, "📷 Clinical Image: Pelvic Organ Prolapse", 6.35, 1.52, 6.4, 0.35, 11.5, bold=True, color=PURPLE)
add_img(sA, img_prolapse_raw, img_prolapse_mime, 6.3, 1.95, 6.6, 3.45)
# ── Symptoms row ──────────────────────────────────────────────────────────────
add_rect(sA, 0.3, 5.65, 12.7, 1.3, RGBColor(0xF3, 0xEE, 0xFF), line_rgb=PURPLE, line_width=0.5)
add_text(sA, "🔍 Common Symptoms of PFD", 0.5, 5.7, 5.0, 0.4, 13.5, bold=True, color=PURPLE)
symp_col1 = ["Leaking urine on coughing / sneezing / exercise",
"Urgent, uncontrollable need to urinate",
"Incomplete bladder or bowel emptying"]
symp_col2 = ["Pelvic heaviness or bulging (prolapse)",
"Chronic pelvic, hip, or lower back pain",
"Painful intercourse or reduced sensation"]
add_bullet_box(sA, symp_col1, 0.5, 6.12, 6.0, 0.8, font_size=12, bullet_color=PURPLE)
add_bullet_box(sA, symp_col2, 6.8, 6.12, 6.0, 0.8, font_size=12, bullet_color=PURPLE)
# Source note
add_text(sA, "Source: Schwartz's Principles of Surgery 11e; Campbell-Walsh-Wein Urology",
0.3, 7.15, 12.7, 0.32, 9, italic=True, color=WARM_WHITE)
# ══════════════════════════════════════════════════════════════════════════════
# NEW SLIDE B — Why Strong Pelvic Floor Muscles Matter
# ══════════════════════════════════════════════════════════════════════════════
sB = prs.slides.add_slide(blank)
set_slide_bg(sB, SOFT_BG)
# Header
add_rect(sB, 0, 0, 13.333, 1.35, GREEN)
add_text(sB, "B", 0.25, 0.12, 0.9, 1.1, 32, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_text(sB, "Why Strong Pelvic Floor Muscles Matter", 1.2, 0.25, 11.0, 0.85, 26,
bold=True, color=WARM_WHITE)
add_text(sB, "Strength here protects your entire body — from bladder to spine to quality of life",
1.2, 0.88, 11.0, 0.44, 14, italic=True, color=RGBColor(0xAA, 0xEE, 0xCC))
add_rect(sB, 0, 7.15, 13.333, 0.35, GREEN)
# ── Left: Anatomy image + label ───────────────────────────────────────────────
add_rect(sB, 0.3, 1.5, 4.5, 5.5, WARM_WHITE, line_rgb=GREEN, line_width=0.5)
add_rect(sB, 0.3, 1.5, 4.5, 0.38, GREEN_LT)
add_text(sB, "📷 Pelvic Floor Muscles (Inferior View)", 0.45, 1.52, 4.2, 0.35, 11,
bold=True, color=GREEN)
add_img(sB, img_muscles_raw, img_muscles_mime, 0.38, 1.94, 4.34, 3.6)
add_text(sB,
"Color-coded: puborectalis (blue), pubococcygeus (green),\n"
"iliococcygeus (yellow), coccygeus (pink).\n"
"These 4 muscles form the levator ani — the primary pelvic floor structure.",
0.4, 5.6, 4.3, 0.95, 10.5, italic=True, color=CHARCOAL, wrap=True)
# ── Middle: Levator anatomy ────────────────────────────────────────────────────
add_rect(sB, 5.1, 1.5, 3.7, 5.5, WARM_WHITE, line_rgb=TEAL, line_width=0.5)
add_rect(sB, 5.1, 1.5, 3.7, 0.38, MINT)
add_text(sB, "📷 Levator Ani & Nerve Supply", 5.22, 1.52, 3.4, 0.35, 11,
bold=True, color=TEAL)
add_img(sB, img_levator_raw, img_levator_mime, 5.18, 1.94, 3.54, 3.6)
add_text(sB,
"Innervated by pudendal nerve (S2-S4). Damage to nerves\n"
"during childbirth or surgery impairs muscle coordination.",
5.22, 5.6, 3.5, 0.95, 10.5, italic=True, color=CHARCOAL, wrap=True)
# ── Right: Why it matters — 6 reason cards ────────────────────────────────────
reasons = [
("🛡️", "Organ Protection", "Holds bladder, uterus, and bowel in correct anatomical position."),
("💧", "Continence Control", "Keeps urethral and anal sphincters closed under pressure spikes."),
("🦴", "Spinal Stability", "Forms the 'floor' of the core cylinder; essential for a pain-free back."),
("🤰", "Birth & Recovery", "Strong muscles recover faster postpartum and reduce prolapse risk."),
("❤️", "Sexual Health", "Improves arousal, sensation, and orgasm quality in all genders."),
("🌟", "Quality of Life", "Prevents embarrassing leaks; enables exercise, travel, and social confidence."),
]
rx = 9.1
ry = 1.5
for i, (icon, title, body) in enumerate(reasons):
row = i // 1
add_rect(sB, rx, ry + i*0.88, 4.0, 0.83, RGBColor(0xF0, 0xFB, 0xF5),
line_rgb=GREEN, line_width=0.4)
add_rect(sB, rx, ry + i*0.88, 0.58, 0.83, GREEN)
add_text(sB, icon, rx, ry + i*0.88, 0.58, 0.83, 15,
align=PP_ALIGN.CENTER, anchor=MSO_ANCHOR.MIDDLE, color=WARM_WHITE)
add_text(sB, title, rx+0.66, ry + i*0.88 + 0.04, 3.2, 0.32, 12.5,
bold=True, color=GREEN)
add_text(sB, body, rx+0.66, ry + i*0.88 + 0.36, 3.2, 0.44, 11,
color=CHARCOAL, wrap=True)
# Source note
add_text(sB, "Sources: StatPearls – Pelvic Floor Anatomy; Campbell-Walsh-Wein Urology; Smith & Tanagho General Urology 19e",
0.3, 7.15, 12.7, 0.32, 9, italic=True, color=WARM_WHITE)
# ══════════════════════════════════════════════════════════════════════════════
# RE-ORDER SLIDES: original 1-2, new A, new B, original 3-8
# ══════════════════════════════════════════════════════════════════════════════
# python-pptx doesn't support slide reordering natively — we do it via XML
xml_slides = prs.slides._sldIdLst
# Current order after appends:
# 0=title, 1=what-are, 2=causes, 3=effects, 4=habits, 5=exercises, 6=when-help, 7=summary, 8=slideA, 9=slideB
# Desired:
# 0=title, 1=what-are, 8=slideA, 9=slideB, 2=causes, 3=effects, 4=habits, 5=exercises, 6=when-help, 7=summary
desired_order = [0, 1, 8, 9, 2, 3, 4, 5, 6, 7]
# Collect all <p:sldId> elements
slide_ids = list(xml_slides)
new_order = [slide_ids[i] for i in desired_order]
# Clear and re-append in desired order
for el in slide_ids:
xml_slides.remove(el)
for el in new_order:
xml_slides.append(el)
print(f"Slides after reorder: {len(prs.slides)}")
# ─── Save ──────────────────────────────────────────────────────────────────────
OUT = "/tmp/workspace/pelvic-floor-pptx/Pelvic_Floor_Strength_Guide_v2.pptx"
buf = BytesIO()
prs.save(buf)
with open(OUT, "wb") as f:
f.write(buf.getvalue())
print(f"Saved: {OUT}")
cd /tmp/workspace/pelvic-floor-pptx && python add_slides.py 2>&1
find /tmp/skills -name "fetch_images.py" 2>/dev/null; ls /tmp/skills/ 2>/dev/null; ls /tmp/skills/shared/ 2>/dev/null || echo "no shared dir"
python3 /tmp/skills/shared/scripts/fetch_images.py "https://teachmeanatomy.info/wp-content/uploads/Muscles-of-the-Pelvic-Floor.jpg" 2>&1 | head -5
~/pelvic-floor-pptx/add_slides.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/pelvic-floor-pptx/add_slides.py'
cd /tmp/workspace/pelvic-floor-pptx && python3 add_slides.py 2>&1
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/pelvic-floor-pptx/Pelvic_Floor_Strength_Guide_v2.pptx') print(f'Total slides: {len(prs.slides)}') for i, slide in enumerate(prs.slides, 1): texts = [] for shape in slide.shapes: if shape.has_text_frame: t = shape.text_frame.text.strip() if t and len(t)>3: texts.append(t[:55]) print(f' Slide {i}: {texts[:2]}') import os size = os.path.getsize('/tmp/workspace/pelvic-floor-pptx/Pelvic_Floor_Strength_Guide_v2.pptx') print(f'File size: {size/1024:.0f} KB') "
Pelvic Floor Strength Guide v2
Presentation · PPTX
| # | Slide |
|---|---|
| 1 | Title |
| 2 | What Are Pelvic Floor Muscles? |
| 3 | PFD — What It Is (NEW + clinical image) |
| 4 | Why Strength Matters (NEW + 2 clinical images) |
| 5 | Causes of Weakness |
| 6 | Effects on Body |
| 7 | Daily Habits |
| 8 | Safe Exercises |
| 9 | When to Seek Help |
| 10 | Key Takeaways |