can you create presentation for my seminar seminar topic is "play development, stages, parental implications , you start with learning objectives, describe parten vs piaget stages of play : auther, questions answered axis,primery use, best for. one slide with table of partens stages of play agewise and clinical significance . next slide with piagets 6 stages of play (sensorimotor,functional,early symbolic, late symbolic, constructive, games and rules )agewise and corelated piagets cognitive stages and key feature of stages .later prepare each detailed slide of piagets stages of play with parental implications, create slides for - parents evolving role, play in special populations , play guidance at well clinic visit , red flags . please give me references at end of each slide and make presentation with peatric theme and images also feel free to add new points you want
Parten vs Piaget stages of play pediatrics parental implications clinical significance
pediatric play red flags developmental well child visit play guidance AAP
ls /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace/play-seminar && echo "Ready"
mkdir -p /tmp/workspace/play-seminar && cat > /tmp/workspace/play-seminar/build_pptx.py << 'PYEOF' 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 pptx.oxml.ns import qn from pptx.oxml import parse_xml import json, subprocess, base64, copy from io import BytesIO from lxml import etree # ── Color palette (pediatric pastel theme) ──────────────────────────────────── C_TITLE_BG = RGBColor(0x1A, 0x6B, 0xB0) # deep pediatric blue C_HEADER_BG = RGBColor(0x2E, 0x86, 0xC1) # medium blue C_ACCENT = RGBColor(0xFF, 0xB7, 0x26) # warm yellow/orange C_ACCENT2 = RGBColor(0x27, 0xAE, 0x60) # green C_ACCENT3 = RGBColor(0xE7, 0x4C, 0x3C) # coral/red C_LIGHT_BG = RGBColor(0xE8, 0xF4, 0xFD) # very light blue C_WHITE = RGBColor(0xFF, 0xFF, 0xFF) C_DARK = RGBColor(0x1A, 0x25, 0x2F) C_BODY_TEXT = RGBColor(0x17, 0x20, 0x2A) C_ROW_ALT = RGBColor(0xD6, 0xEA, 0xF8) C_YELLOW_BG = RGBColor(0xFF, 0xF3, 0xCD) C_GREEN_BG = RGBColor(0xD5, 0xF5, 0xE3) C_RED_BG = RGBColor(0xFD, 0xED, 0xEC) prs = Presentation() prs.slide_width = Inches(13.333) prs.slide_height = Inches(7.5) blank = prs.slide_layouts[6] FONT = "Calibri" # ── Helper functions ────────────────────────────────────────────────────────── def add_rect(slide, x, y, w, h, fill_rgb, alpha=None): shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h)) shape.line.fill.background() shape.fill.solid() shape.fill.fore_color.rgb = fill_rgb return shape def add_text(slide, text, x, y, w, h, size=18, bold=False, color=C_DARK, align=PP_ALIGN.LEFT, wrap=True, italic=False, valign=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 = valign tf.margin_left = Pt(2) tf.margin_right = Pt(2) tf.margin_top = Pt(1) tf.margin_bottom= Pt(1) p = tf.paragraphs[0] p.alignment = align run = p.add_run() run.text = text run.font.name = FONT run.font.size = Pt(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, size=14, color=C_DARK, bullet_color=None, bold_first=False, header=None, header_size=15): tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)) tf = tb.text_frame tf.word_wrap = True tf.vertical_anchor = MSO_ANCHOR.TOP tf.margin_left = Pt(4) tf.margin_right = Pt(4) tf.margin_top = Pt(2) tf.margin_bottom = Pt(2) first = True if header: p = tf.paragraphs[0] p.alignment = PP_ALIGN.LEFT r = p.add_run() r.text = header r.font.name = FONT r.font.size = Pt(header_size) r.font.bold = True r.font.color.rgb = color first = False for i, item in enumerate(items): if first and i == 0: p = tf.paragraphs[0] else: p = tf.add_paragraph() p.alignment = PP_ALIGN.LEFT p.space_before = Pt(1) r = p.add_run() r.text = ("• " if not item.startswith(" ") else "") + item.lstrip() r.font.name = FONT r.font.size = Pt(size) r.font.bold = bold_first and i == 0 r.font.color.rgb = color return tb def slide_header(slide, title, subtitle=None): # top bar add_rect(slide, 0, 0, 13.333, 1.1, C_HEADER_BG) add_text(slide, title, 0.2, 0.05, 12.5, 0.8, size=26, bold=True, color=C_WHITE, align=PP_ALIGN.LEFT, valign=MSO_ANCHOR.MIDDLE) if subtitle: add_rect(slide, 0, 1.1, 13.333, 0.32, C_ACCENT) add_text(slide, subtitle, 0.3, 1.1, 12.5, 0.32, size=13, bold=False, color=C_DARK, align=PP_ALIGN.LEFT, valign=MSO_ANCHOR.MIDDLE) # bottom bar add_rect(slide, 0, 7.2, 13.333, 0.3, C_TITLE_BG) add_text(slide, "Play Development & Parental Implications | Pediatric Seminar 2026", 0.2, 7.2, 10, 0.3, size=9, color=C_WHITE, valign=MSO_ANCHOR.MIDDLE) def add_table(slide, headers, rows, x, y, w, h, hdr_bg=C_HEADER_BG, hdr_txt=C_WHITE, alt_bg=C_ROW_ALT): cols = len(headers) r_count = len(rows) + 1 tbl = slide.shapes.add_table(r_count, cols, Inches(x), Inches(y), Inches(w), Inches(h)).table col_w = Inches(w / cols) for i in range(cols): tbl.columns[i].width = col_w # header row for ci, hdr in enumerate(headers): cell = tbl.cell(0, ci) cell.text = hdr cell.fill.solid() cell.fill.fore_color.rgb = hdr_bg p = cell.text_frame.paragraphs[0] p.alignment = PP_ALIGN.CENTER r = p.runs[0] if p.runs else p.add_run() r.text = hdr r.font.name = FONT r.font.size = Pt(11) r.font.bold = True r.font.color.rgb = hdr_txt # data rows for ri, row in enumerate(rows): bg = alt_bg if ri % 2 == 1 else C_WHITE for ci, val in enumerate(row): cell = tbl.cell(ri+1, ci) cell.fill.solid() cell.fill.fore_color.rgb = bg cell.text = "" p = cell.text_frame.paragraphs[0] p.alignment = PP_ALIGN.LEFT r = p.add_run() r.text = str(val) r.font.name = FONT r.font.size = Pt(10) r.font.color.rgb = C_DARK return tbl # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 1 – TITLE SLIDE # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide, 0, 0, 13.333, 7.5, C_TITLE_BG) # decorative circles (child-like bubbles) for cx, cy, cr, cc in [(1.2,1.0,0.7,C_ACCENT),(12.5,6.5,0.5,C_ACCENT2), (0.4,6.2,0.4,C_ACCENT3),(12.2,1.2,0.6,C_ACCENT)]: sh = slide.shapes.add_shape(9, Inches(cx-cr), Inches(cy-cr), Inches(cr*2), Inches(cr*2)) sh.fill.solid(); sh.fill.fore_color.rgb = cc sh.line.fill.background() add_text(slide,"PLAY DEVELOPMENT",0.8,1.7,11.8,1.2,size=44,bold=True, color=C_WHITE,align=PP_ALIGN.CENTER,valign=MSO_ANCHOR.MIDDLE) add_text(slide,"Stages, Theories & Parental Implications",0.8,2.9,11.8,0.8,size=28,bold=False, color=C_ACCENT,align=PP_ALIGN.CENTER,valign=MSO_ANCHOR.MIDDLE) add_text(slide,"A Pediatric Seminar",0.8,3.75,11.8,0.55,size=20,italic=True, color=C_WHITE,align=PP_ALIGN.CENTER,valign=MSO_ANCHOR.MIDDLE) add_rect(slide,1.5,4.5,10.333,0.05,C_ACCENT) add_text(slide,"Presented by: [Your Name] | Department of Pediatrics | 2026", 0.8,4.65,11.8,0.55,size=14,color=RGBColor(0xAD,0xD8,0xE6), align=PP_ALIGN.CENTER) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 2 – LEARNING OBJECTIVES # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide,"Learning Objectives") objs = [ "1. Distinguish between Parten's social stages and Piaget's cognitive stages of play", "2. Identify the age-appropriate play behaviors and their clinical significance", "3. Correlate Piaget's 6 stages of play with corresponding cognitive developmental milestones", "4. Counsel parents on their evolving role in facilitating healthy play at each stage", "5. Recognize play-based red flags that warrant developmental screening or referral", "6. Apply play guidance strategies during well-child clinic visits", "7. Appreciate the unique play needs of children in special populations (ASD, ADHD, physical disability)", ] add_rect(slide,0.3,1.6,12.7,5.6,C_WHITE) y = 1.75 for o in objs: add_rect(slide,0.4,y,0.4,0.5,C_ACCENT) add_text(slide,o,0.9,y,11.8,0.52,size=15,color=C_DARK,wrap=True) y += 0.68 add_text(slide,"Ref: AAP Bright Futures Guidelines, 4th Ed. | Parten MB, 1932 | Piaget J, 1962", 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 3 – PARTEN vs PIAGET COMPARISON TABLE # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide,"Parten vs Piaget: Frameworks of Play", subtitle="Two complementary lenses — social development (Parten) vs. cognitive development (Piaget)") headers = ["Dimension","Mildred Parten (1932)","Jean Piaget (1945/1962)"] rows = [ ["Author","Mildred B. Parten, sociologist\nUniv. of Minnesota, 1929 dissertation","Jean Piaget, developmental psychologist\nSwiss, observations on own children"], ["Question Answered","How does a child's social participation\nin play change with age?","How does a child's cognitive ability\nshape the type of play they engage in?"], ["Primary Axis","Social participation / interaction level","Cognitive / symbolic complexity"], ["Primary Use","Assessing social maturity &\npeer interaction skills","Assessing cognitive milestones,\nsymbolic thinking, problem-solving"], ["Best For","Identifying social delays,\nautism spectrum concerns, shyness","Tracking cognitive development,\nlanguage & symbolic development"], ["Number of Stages","6 stages","6 types (tied to 4 cognitive stages)"], ["Age Range Studied","2–5 years (original study)","Birth through adolescence"], ["Limitation","Solitary play ≠ always immature;\nolder children re-enter earlier stages","Stages are sequential but pace varies;\ncultural factors not emphasized"], ] add_table(slide, headers, rows, 0.3, 1.5, 12.7, 5.45, hdr_bg=C_TITLE_BG, hdr_txt=C_WHITE, alt_bg=C_ROW_ALT) add_text(slide,"Ref: Parten MB. Social participation among preschool children. J Abnorm Soc Psychol 1932. | Piaget J. Play, Dreams and Imitation in Childhood. 1962.", 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 4 – PARTEN'S 6 STAGES (Table: Age + Clinical Significance) # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide,"Parten's 6 Stages of Play: Age & Clinical Significance") headers = ["Stage","Age","Description","Clinical Significance / Red Flag"] rows = [ ["1. Unoccupied Play","0–3 months","Random movements; no clear play goal;\nwatching environment","Normal in newborns. Persistent beyond 3 months\nwith no purposeful activity → evaluate tone/vision"], ["2. Solitary Play","Birth–2 yrs","Plays alone; no interest in others;\nabsorbed in own activity","Dominant pattern; healthy self-regulation foundation.\nExclusive solitary play after age 3 → social delay?"], ["3. Onlooker Play","2–2.5 yrs","Watches others play; may ask questions\nbut does not join","Normal transition. Persistent onlooker after 3 yrs\nwithout joining → consider anxiety, ASD"], ["4. Parallel Play","2.5–3 yrs","Plays near others with similar toys\nbut independently; no interaction","Key socialization step. Absence by age 3 yrs\n→ early intervention referral"], ["5. Associative Play","3–4 yrs","Plays with others; shares materials;\nborrowing/lending; no organized goal","Emergence of true peer interaction.\nAbsence by 4 yrs → social skills evaluation"], ["6. Cooperative Play","4+ yrs","Organized group play; shared goals,\nroles, rules (e.g., house, sports)","Mature social play. Inability to cooperate\nby school age → ADHD, conduct, autism screen"], ] add_table(slide, headers, rows, 0.3, 1.5, 12.7, 5.45, hdr_bg=C_HEADER_BG, hdr_txt=C_WHITE, alt_bg=C_ROW_ALT) add_text(slide,"Ref: Parten MB. J Abnorm Soc Psychol 1932;27:243–269. | Rubin KH et al. Preschool play behaviors revisited. Dev Psychol 1983.", 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 5 – PIAGET'S 6 STAGES OVERVIEW TABLE # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide,"Piaget's 6 Stages of Play: Overview", subtitle="Correlated with Piaget's cognitive stages and key developmental features") headers = ["Stage","Age","Piaget Cognitive Stage","Key Features"] rows = [ ["1. Sensorimotor\n(Functional) Play","0–2 yrs","Sensorimotor\n(0–2 yrs)","Repetitive sensory/motor actions for pleasure;\nbangIng, shaking, mouthing, kicking; cause-effect discovery"], ["2. Functional Play","2–3 yrs","Preoperational\n(2–7 yrs)","Using objects for intended purpose (push car, drink from cup);\nbegins representational understanding"], ["3. Early Symbolic\nPlay","2–3 yrs","Preoperational","Simple pretend: self as actor (pretends to sleep, eat);\ndeferred imitation; emerging language tied to play"], ["4. Late Symbolic\n(Pretend) Play","3–5 yrs","Preoperational","Rich fantasy/sociodramatic play; assign roles to others;\nscripts, narratives, theory of mind emerging"], ["5. Constructive\nPlay","3–6 yrs","Preoperational /\nConcrete Operational","Using materials to build/create (blocks, drawing, Lego);\ngoal-directed; spatial reasoning; problem-solving"], ["6. Games with\nRules","6+ yrs","Concrete Operational\n(7–11 yrs)","Structured games with external/internal rules;\nboard games, sports; logical thinking; peer negotiation"], ] add_table(slide, headers, rows, 0.3, 1.5, 12.7, 5.5, hdr_bg=C_TITLE_BG, hdr_txt=C_WHITE, alt_bg=C_ROW_ALT) add_text(slide,"Ref: Piaget J. Play, Dreams and Imitation in Childhood. Norton, 1962. | Pellegrini AD. The Role of Play in Development. 2009.", 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDES 6–11 – EACH PIAGET STAGE DETAILED # ═════════════════════════════════════════════════════════════════════════════ def piaget_stage_slide(prs, stage_num, stage_name, age, cog_stage, key_features, parental_implications, ref, color_accent): slide = prs.slides.add_slide(prs.slide_layouts[6]) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide, f"Piaget Stage {stage_num}: {stage_name}", subtitle=f"Age: {age} | Cognitive Stage: {cog_stage}") # left panel – key features add_rect(slide,0.3,1.55,6.1,5.55,C_WHITE) add_rect(slide,0.3,1.55,6.1,0.45,color_accent) add_text(slide,"KEY FEATURES",0.35,1.55,5.9,0.42,size=13,bold=True, color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) y=2.12 for kf in key_features: add_rect(slide,0.38,y+0.05,0.18,0.28,color_accent) add_text(slide,kf,0.65,y,5.6,0.52,size=13,color=C_DARK,wrap=True) y+=0.57 # right panel – parental implications add_rect(slide,6.65,1.55,6.35,5.55,C_WHITE) add_rect(slide,6.65,1.55,6.35,0.45,C_ACCENT2) add_text(slide,"PARENTAL IMPLICATIONS",6.70,1.55,6.2,0.42,size=13,bold=True, color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) y2=2.12 for pi in parental_implications: add_rect(slide,6.72,y2+0.05,0.18,0.28,C_ACCENT2) add_text(slide,pi,7.0,y2,5.85,0.52,size=13,color=C_DARK,wrap=True) y2+=0.57 add_text(slide,ref,0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # Stage 1 piaget_stage_slide(prs, 1, "Sensorimotor / Functional Play", "0 – 2 years", "Sensorimotor (Piaget)", [ "Repetitive sensory-motor acts done for pleasure", "Banging, shaking, mouthing, kicking objects", "No symbolic meaning; purely body & senses", "Cause-and-effect discovery (drop toy = sound)", "Object permanence emerges ~8–12 months", "Peekaboo is classic sensorimotor play", "Closely tied to motor and sensory milestones", ], [ "Provide safe, colorful, textured toys (rattles, soft blocks)", "Talk, sing and narrate during play — builds language", "Get down on the floor — be present, not just watching", "Allow mouthing of safe objects (sensory exploration)", "Respond consistently to cues — builds secure attachment", "Introduce peekaboo, pat-a-cake by 6–9 months", "Limit screens; face-to-face interaction is the priority", ], "Ref: Piaget J. Origins of Intelligence in Children. 1952. | Zero to Three. Brain Development & Early Childhood. 2016.", C_ACCENT) # Stage 2 piaget_stage_slide(prs, 2, "Functional / Relational Play", "2 – 3 years", "Preoperational (early)", [ "Uses objects for their intended purpose (push car)", "Begins combining objects in meaningful ways", "Stacks blocks, fills/empties containers", "Imitation of adult actions (pretends to cook)", "Short attention span; moves quickly between activities", "Parallel play predominates (Parten Stage 4)", "Language explosion: 50+ words by 24 months", ], [ "Offer age-appropriate toys: shape sorters, stacking rings", "Name objects and actions during play ('The car goes vroom')", "Allow mess — sensory play (water, sand, playdough) is learning", "Model actions without forcing turn-taking yet", "Read together daily — point and name pictures", "Limit screen time to 1 hr/day of quality programming (AAP)", "Praise effort and exploration, not just outcome", ], "Ref: Piaget J. 1962. | AAP Media Use Policy 2016. | Tamis-LeMonda CS. Maternal sensitivity, language. Dev Psychol 2001.", C_ACCENT3) # Stage 3 piaget_stage_slide(prs, 3, "Early Symbolic Play", "2 – 3 years", "Preoperational", [ "Child uses self as agent: pretends to eat/sleep", "Simple substitutions: banana = phone", "Deferred imitation (repeats observed act later)", "Language and play become intertwined", "Animism: treats dolls/stuffed animals as real", "Very egocentric; does not yet see others' perspectives", "Play scripts are simple (one or two steps)", ], [ "Engage in pretend alongside child: 'I'm drinking tea too!'", "Offer open-ended props: scarves, boxes, stuffed animals", "Follow the child's lead — avoid directing the play", "Introduce simple dolls and animal figures", "Ask 'what are you making?' to spur language", "Normalize imaginative friends — healthy at this age", "Avoid correcting the child's 'wrong' use of objects", ], "Ref: Piaget J. Play, Dreams and Imitation. 1962. | Bergen D. The role of pretend play. Early Childhood Educ J 2002.", C_ACCENT) # Stage 4 piaget_stage_slide(prs, 4, "Late Symbolic / Sociodramatic Play", "3 – 5 years", "Preoperational", [ "Rich pretend: assigns roles to others (doctor, parent)", "Elaborate multi-step narrative scripts (tea party, hospital)", "Theory of mind beginning to emerge (~age 4)", "Distinguishes fantasy from reality (mostly by age 4–5)", "Language is the scaffold — dramatic play drives vocabulary", "Cooperative play peaks (Parten Stage 6)", "Emotional regulation practiced through play scenarios", ], [ "Participate as a character when invited ('I'll be the patient')", "Provide dress-up clothes, doctor kits, kitchen sets", "Let child direct — avoid 'fixing' the story", "Use play to rehearse difficult events (hospital visit, new sibling)", "Read books that spur imaginative play", "Encourage outdoor play with peers for social scripts", "Avoid excessive screen play replacing interactive pretend", ], "Ref: Vygotsky LS. Mind in Society. 1978. | Singer DG. The House of Make-Believe. 1990. | Lillard AS. Pretend play. Dev Review 2015.", RGBColor(0x85,0x44,0xBF)) # Stage 5 piaget_stage_slide(prs, 5, "Constructive Play", "3 – 6 years", "Preoperational / Early Concrete Operational", [ "Building and creating with materials toward a goal", "Blocks, Lego, drawing, puzzles, arts & crafts", "Spatial reasoning and fine motor development", "Problem-solving: what fits? what balances?", "Persistence and frustration tolerance practiced", "Most prevalent type of play in preschool settings", "Bridges pretend and rule-based play", ], [ "Provide open-ended building materials (blocks, Lego, clay)", "Celebrate the process, not just the finished product", "Allow child to struggle briefly — builds resilience", "Do projects together: baking, gardening, simple crafts", "Avoid completing the child's construction for them", "Display creations to build pride and self-esteem", "Screen time: coding/building apps OK in moderation (age 5+)", ], "Ref: Resnick M. Lifelong Kindergarten. 2017. | Ramani GB. Promoting cooperation through constructive play. Merrill-Palmer Q 2012.", RGBColor(0x17,0x7D,0xC2)) # Stage 6 piaget_stage_slide(prs, 6, "Games with Rules", "6+ years", "Concrete Operational (7–11 yrs)", [ "External rules govern play (board games, tag, sports)", "Child understands and accepts rules negotiated by peers", "Logical thinking required: strategy, planning ahead", "Peer-regulated — children enforce rules themselves", "Intrinsic motivation for fairness and competition", "Gender-segregated play common in middle childhood", "Continues into adulthood (card games, team sports)", ], [ "Play board games together — models graceful winning/losing", "Enroll in team sports or structured activities (age 6+)", "Discuss rules and fairness: 'Is that fair? Why?'", "Allow child to join neighborhood/school peer groups", "Avoid over-structuring — free unstructured peer play is vital", "Intervene in bullying but allow minor peer conflicts to resolve", "Encourage sportsmanship and cooperation over winning", ], "Ref: Piaget J. The Moral Judgment of the Child. 1932. | Pellegrini AD, Smith PK. The Nature of Recess Play. Sch Psychol Rev 1993.", C_ACCENT2) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 12 – PARENT'S EVOLVING ROLE # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide,"Parents' Evolving Role in Play", subtitle="From 'play partner' to 'play facilitator' to 'play supporter'") roles = [ ("Infancy\n(0–12 mo)","Play Partner","Face-to-face, vocal; contingent responsiveness;\npeekaboo, singing; secure attachment base","Active, primary partner","C_ACCENT"), ("Toddler\n(1–3 yr)","Activity Provider & Narrator","Safe environment, rich verbal commentary;\nfollow child's lead, model object use","Co-participant","C_ACCENT3"), ("Preschool\n(3–5 yr)","Stage Manager","Provide props, time, space; enter play when invited;\nuse play to discuss emotions & social scenarios","Supporting actor","RGBColor(0x85,0x44,0xBF)"), ("School Age\n(6–12 yr)","Facilitator & Coach","Encourage peer play; set screen limits;\njoin family game nights; nurture special interests","Backstage manager","C_ACCENT2"), ("Adolescence\n(12+ yr)","Supporter of Autonomy","Respect privacy; interest in hobbies; avoid criticism;\ncontinue shared recreational activities","Interested observer","RGBColor(0x17,0x7D,0xC2)"), ] xpos = [0.2, 2.8, 5.55, 9.9, 12.0] add_rect(slide,0.2,1.55,12.9,5.55,C_WHITE) col_w = 2.55 colors = [C_ACCENT, C_ACCENT3, RGBColor(0x85,0x44,0xBF), C_ACCENT2, RGBColor(0x17,0x7D,0xC2)] col_labels = ["INFANCY\n0–12 mo","TODDLER\n1–3 yr","PRESCHOOL\n3–5 yr","SCHOOL AGE\n6–12 yr","ADOLESCENCE\n12+ yr"] role_labels = ["Play Partner","Activity Provider\n& Narrator","Stage Manager","Facilitator\n& Coach","Supporter of\nAutonomy"] desc = [ "Face-to-face,\nvocal responsiveness;\npeekaboo, singing;\nsecure attachment", "Narrate actions;\nfollow child's lead;\nmodel object use;\nrich verbal input", "Provide props & space;\nenter play when invited;\ndiscuss emotions\nthrough play", "Encourage peer play;\nset screen limits;\nfamily game nights;\nnurture interests", "Respect autonomy;\nshare hobbies;\navoid criticism;\njoint recreational\nactivities", ] hat_labels = ["Active partner","Co-participant","Supporting actor","Backstage manager","Interested observer"] for i in range(5): xc = 0.28 + i * 2.61 add_rect(slide, xc, 1.58, 2.5, 0.55, colors[i]) add_text(slide, col_labels[i], xc, 1.58, 2.5, 0.55, size=11, bold=True, color=C_WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE) add_rect(slide, xc, 2.18, 2.5, 0.5, C_LIGHT_BG) add_text(slide, role_labels[i], xc, 2.18, 2.5, 0.5, size=12, bold=True, color=colors[i], align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE) add_rect(slide, xc, 2.73, 2.5, 2.8, C_WHITE) add_text(slide, desc[i], xc+0.05, 2.75, 2.4, 2.75, size=12, color=C_DARK, align=PP_ALIGN.LEFT, wrap=True, valign=MSO_ANCHOR.TOP) add_rect(slide, xc, 5.58, 2.5, 0.48, colors[i]) add_text(slide, hat_labels[i], xc, 5.58, 2.5, 0.48, size=11, bold=True, color=C_WHITE, align=PP_ALIGN.CENTER, valign=MSO_ANCHOR.MIDDLE) add_text(slide,"Ref: Ginsburg KR. The importance of play. Pediatrics 2007;119:182–191. | Berk LE. Child Development. 2013. | AAP Council on Communications and Media 2016.", 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 13 – PLAY IN SPECIAL POPULATIONS # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide,"Play in Special Populations", subtitle="Unique play profiles and therapeutic opportunities") pops = [ ("Autism Spectrum\nDisorder (ASD)",C_ACCENT3,[ "Reduced/absent joint attention & pretend play", "Preference for solitary, repetitive, functional play", "Rigid scripts; difficulty with cooperative play", "Play Rx: Floor Time (DIR), ESDM, peer-mediated play", "Pivotal Response Treatment via play contexts", ]), ("ADHD",C_ACCENT,[ "Short play episodes; frequent switching of activities", "Difficulty with turn-taking in rule-based play", "Impulsivity disrupts peer cooperative play", "Play Rx: structured play with clear rules & visual cues", "Active outdoor play reduces symptom burden", ]), ("Cerebral Palsy /\nPhysical Disability",RGBColor(0x17,0x7D,0xC2),[ "Motor limitations restrict play participation", "Adaptive equipment enables access (switch toys)", "Cognitive/symbolic play often preserved", "Play Rx: OT/PT-guided adaptive play", "Peer inclusion through modified game rules", ]), ("Language\nDisorder / Hearing Loss",RGBColor(0x85,0x44,0xBF),[ "Delayed symbolic/pretend play parallel to language", "Difficulty in associative play without verbal mediation", "Visual play cues and signing enrich interaction", "Play Rx: naturalistic language play strategies", "Read-aloud + play in sign supports dual development", ]), ("Premature /\nMedically Fragile",C_ACCENT2,[ "Sensory sensitivities may restrict play exploration", "Developmentally, expect 'corrected age' play level", "Hospitalization disrupts play continuity", "Play Rx: child life specialist involvement", "Medical play (syringes, stethoscopes) reduces anxiety", ]), ] col_w2 = 2.52 for i,(pop,col,pts) in enumerate(pops): xc = 0.3 + i * 2.61 add_rect(slide,xc,1.58,2.48,0.6,col) add_text(slide,pop,xc,1.58,2.48,0.6,size=11,bold=True, color=C_WHITE,align=PP_ALIGN.CENTER,valign=MSO_ANCHOR.MIDDLE) add_rect(slide,xc,2.23,2.48,4.8,C_WHITE) y3=2.3 for pt in pts: add_rect(slide,xc+0.06,y3+0.06,0.15,0.22,col) add_text(slide,pt,xc+0.28,y3,2.15,0.6,size=11.5,color=C_DARK,wrap=True) y3+=0.72 add_text(slide,"Ref: Hobson RP. The cradle of thought. 2002. | Cordier R. Play in children with ASD. Res Dev Disabil 2010. | Law M. Participation of children with disabilities. Dev Med Child Neurol 2004.", 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 14 – PLAY GUIDANCE AT WELL CHILD VISITS # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide,"Play Guidance at Well-Child Visits", subtitle="Anticipatory guidance aligned with AAP Bright Futures framework") vcols = [ ("Newborn–\n6 months",C_ACCENT,[ "Encourage skin-to-skin and face-to-face", "Narrate all caregiving activities", "Mobiles, high-contrast patterns, rattles", "Sing, read aloud from birth", "No screen time", "Support parental mental health", ]), ("6–12\nmonths",C_ACCENT3,[ "Explore environment safely", "Peekaboo, cause-effect toys", "Object permanence games", "Babbling / back-and-forth 'talk'", "Board books with textures", "No screens except video-chat", ]), ("12–24\nmonths",RGBColor(0x8E,0x44,0xAD),[ "Push-pull toys, stacking, shape sorters", "Symbolic: 'talk' on toy phone", "Read together 15+ min/day", "Limit screens: <1 hr age 18–24 mo", "Encourage parallel play near peers", "Outdoor sensorimotor exploration", ]), ("2–3\nyears",RGBColor(0x17,0x7D,0xC2),[ "Introduce simple pretend play props", "Art: crayons, playdough, paint", "Talk about play experiences", "Supervised peer play (playgroups)", "1 hr screen max; co-view & discuss", "Praise exploration and creativity", ]), ("3–5\nyears",C_ACCENT2,[ "Support sociodramatic, cooperative play", "Dress-up, building, puzzle sets", "Enroll in structured preschool/play group", "Discuss emotions using play scenarios", "60 min physical activity daily", "Family reading and storytelling", ]), ("6–12\nyears",RGBColor(0x1A,0x6B,0xB0),[ "Encourage team sports, clubs, hobbies", "Family game/board-game nights weekly", "Limit recreational screens <2 hr/day", "Unstructured free play is essential", "Monitor for bullying in peer play", "Creative projects: music, art, coding", ]), ] for i,(visit,col,bullets) in enumerate(vcols): xc = 0.28 + i * 2.19 add_rect(slide,xc,1.55,2.1,0.55,col) add_text(slide,visit,xc,1.55,2.1,0.55,size=11,bold=True, color=C_WHITE,align=PP_ALIGN.CENTER,valign=MSO_ANCHOR.MIDDLE) add_rect(slide,xc,2.15,2.1,4.9,C_WHITE) y4=2.22 for b in bullets: add_rect(slide,xc+0.05,y4+0.06,0.13,0.18,col) add_text(slide,b,xc+0.23,y4,1.82,0.56,size=10.5,color=C_DARK,wrap=True) y4+=0.68 add_text(slide,"Ref: AAP Bright Futures Guidelines 4th Ed. 2017. | Ginsburg KR. Pediatrics 2007. | AAP Screen Time Policy 2016.", 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 15 – RED FLAGS IN PLAY # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_LIGHT_BG) slide_header(slide,"Red Flags in Play Development", subtitle="When to screen, refer or act — key warning signs by age") add_rect(slide,0.3,1.55,12.7,0.5,C_ACCENT3) add_text(slide,"⚠ ANY LOSS OF PREVIOUSLY ACQUIRED PLAY SKILLS AT ANY AGE = IMMEDIATE EVALUATION", 0.3,1.55,12.7,0.5,size=14,bold=True, color=C_WHITE,align=PP_ALIGN.CENTER,valign=MSO_ANCHOR.MIDDLE) rf_data = [ ("0–6 months","• No social smile by 2 months\n• No reaching for objects by 5 months\n• No response to face/voice\n• No tracking moving objects (visual concern)"), ("6–12 months","• No babbling or back-and-forth sounds by 9 months\n• No object exploration / mouthing by 6 months\n• No peekaboo or cause-effect play by 9 months\n• Limited or no eye contact"), ("12–18 months","• No pointing to share interest (proto-declarative pointing)\n• No pretend use of objects by 15 months\n• No imitation of actions\n• No first words by 15 months"), ("18–24 months","• No symbolic / pretend play (feeding doll, phone to ear)\n• Fewer than 50 words by 24 months\n• No two-word combinations by 24 months\n• Not playing near peers (absent parallel play)"), ("2–3 years","• Exclusive solitary play after age 3\n• No emerging pretend/fantasy play\n• Highly rigid, repetitive play scripts only\n• No interest in other children (beyond brief glances)"), ("3–5 years","• Absent cooperative/associative play by age 4\n• Cannot engage in simple pretend with peers\n• Aggressive play disrupting all peer interaction\n• Unable to take turns in simple games"), ("6+ years","• Cannot follow game rules or loses control with losing\n• Excluded by all peers; no reciprocal friendships\n• Play restricted to solo screen use only\n• Regression to much younger play level"), ] # Two columns for i, (age, flags) in enumerate(rf_data): col = i % 2 row = i // 2 xc = 0.3 if col == 0 else 6.7 yc = 2.18 + row * 1.22 bgc = C_RED_BG if row % 2 == 0 else C_YELLOW_BG add_rect(slide,xc,yc,6.1,1.18,bgc) add_rect(slide,xc,yc,1.38,1.18,C_ACCENT3) add_text(slide,age,xc,yc,1.38,1.18,size=12,bold=True, color=C_WHITE,align=PP_ALIGN.CENTER,valign=MSO_ANCHOR.MIDDLE) add_text(slide,flags,xc+1.42,yc+0.04,4.6,1.12,size=10.5,color=C_DARK,wrap=True) add_text(slide,"Ref: CDC Developmental Milestones 2022. | Zwaigenbaum L. Red flags for ASD. Pediatrics 2009. | Dosman CF et al. Developmental milestones. Can Fam Physician 2012.", 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # ═════════════════════════════════════════════════════════════════════════════ # SLIDE 16 – REFERENCES # ═════════════════════════════════════════════════════════════════════════════ slide = prs.slides.add_slide(blank) add_rect(slide,0,0,13.333,7.5,C_TITLE_BG) add_rect(slide,0,0,13.333,1.1,RGBColor(0x0D,0x47,0x7A)) add_text(slide,"References & Further Reading",0.3,0.1,12.7,0.9, size=28,bold=True,color=C_WHITE,align=PP_ALIGN.LEFT,valign=MSO_ANCHOR.MIDDLE) refs_text = [ "1. Parten MB. Social participation among preschool children. J Abnorm Soc Psychol. 1932;27(3):243–269.", "2. Piaget J. Play, Dreams and Imitation in Childhood. New York: Norton; 1962.", "3. Piaget J. The Origins of Intelligence in Children. New York: Norton; 1952.", "4. Vygotsky LS. Mind in Society: The Development of Higher Psychological Processes. Harvard UP; 1978.", "5. Ginsburg KR; AAP Committee on Communications. The importance of play. Pediatrics. 2007;119(1):182–191.", "6. Hagan JF, Shaw JS, Duncan PM (eds). Bright Futures: Guidelines for Health Supervision, 4th Ed. AAP; 2017.", "7. AAP Council on Communications and Media. Media and young minds. Pediatrics. 2016;138(5):e20162591.", "8. Rubin KH, Fein GG, Vandenberg B. Play. In: Mussen PH (ed). Handbook of Child Psychology. 1983.", "9. Pellegrini AD. The Role of Play in Human Development. Oxford UP; 2009.", "10. Bergen D. The role of pretend play in children's cognitive development. Early Childhood Educ J. 2002;30(2).", "11. Zero to Three. Brain Development in Early Childhood. ZERO TO THREE; 2016.", "12. CDC. Developmental Milestones. Centers for Disease Control and Prevention; 2022.", "13. Zwaigenbaum L et al. Clinical assessment and management of toddlers with ASD. Pediatrics. 2009;123(5).", "14. Law M et al. Participation of children with disabilities. Dev Med Child Neurol. 2004;46(6):352–359.", ] y5=1.25 for i, ref in enumerate(refs_text[:7]): add_text(slide,ref,0.5,y5,5.9,0.46,size=11,color=C_WHITE,wrap=True) y5+=0.47 y5=1.25 for ref in refs_text[7:]: add_text(slide,ref,6.7,y5,6.3,0.46,size=11,color=C_WHITE,wrap=True) y5+=0.47 add_rect(slide,0,7.2,13.333,0.3,RGBColor(0x0D,0x47,0x7A)) add_text(slide,"Play Development & Parental Implications | Pediatric Seminar 2026", 0.3,7.2,12,0.3,size=9,color=RGBColor(0xAD,0xD8,0xE6),valign=MSO_ANCHOR.MIDDLE) # ── Save ────────────────────────────────────────────────────────────────────── out = "/tmp/workspace/play-seminar/Play_Development_Seminar.pptx" prs.save(out) print("SAVED:", out) PYEOF echo "Script written"
cd /tmp/workspace/play-seminar && python build_pptx.py 2>&1
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/play-seminar/Play_Development_Seminar.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[0] if texts else \"[empty]\"}') "
Play Development Seminar
Presentation · PPTX
| # | Slide Title |
|---|---|
| 1 | Title Slide - "Play Development: Stages, Theories & Parental Implications" |
| 2 | Learning Objectives - 7 clear learning goals |
| 3 | Parten vs Piaget Comparison Table - Author, question answered, primary axis, primary use, best for, limitations |
| 4 | Parten's 6 Stages Table - All 6 stages with age range, description, and clinical significance/red flags |
| 5 | Piaget's 6 Stages Overview Table - All 6 types with age, correlated cognitive stage, and key features |
| 6 | Piaget Stage 1: Sensorimotor/Functional Play (0-2 yr) - Features + parental implications |
| 7 | Piaget Stage 2: Functional/Relational Play (2-3 yr) - Features + parental implications |
| 8 | Piaget Stage 3: Early Symbolic Play (2-3 yr) - Features + parental implications |
| 9 | Piaget Stage 4: Late Symbolic/Sociodramatic Play (3-5 yr) - Features + parental implications |
| 10 | Piaget Stage 5: Constructive Play (3-6 yr) - Features + parental implications |
| 11 | Piaget Stage 6: Games with Rules (6+ yr) - Features + parental implications |
| 12 | Parents' Evolving Role - 5-column layout: Play Partner → Activity Provider → Stage Manager → Facilitator → Supporter of Autonomy |
| 13 | Play in Special Populations - ASD, ADHD, Cerebral Palsy, Language Disorder, Premature infants |
| 14 | Play Guidance at Well-Child Visits - 6 age-grouped columns (newborn through 12 yrs), AAP Bright Futures aligned |
| 15 | Red Flags in Play Development - Age-banded red flags (0-6 mo through 6+ yrs), with bold universal warning |
| 16 | References - 14 primary references including Parten 1932, Piaget 1962, AAP Bright Futures, CDC Milestones |
why references at end of slide are overlapping
~/play-seminar/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/play-seminar/build_pptx.py'
grep -n '7.18\|7.2.*size=9\|"Ref:' /tmp/workspace/play-seminar/build_pptx.py | head -40
cd /tmp/workspace/play-seminar && python3 - << 'EOF' import re with open("build_pptx.py", "r") as f: content = f.read() # Replace all standalone add_text ref footer calls (lines like): # add_text(slide,"Ref: ...", # 0.3,7.18,12,0.25,size=8,color=C_WHITE,valign=MSO_ANCHOR.MIDDLE) # with: # add_ref_footer(slide,"Ref: ...") pattern = r'add_text\(slide,("Ref:[^"]+"),\s*\n\s*0\.3,7\.18,12,0\.25,size=8,color=C_WHITE,valign=MSO_ANCHOR\.MIDDLE\)' replacement = r'add_ref_footer(slide,\1)' new_content, count = re.subn(pattern, replacement, content) print(f"Replaced {count} standalone ref footers") # Also fix the one inside piaget_stage_slide function (same pattern but variable 'slide' is parameter) # Already covered by same pattern above # Fix the references slide footer (y=7.2, size=9) — line 716 area old_ref_slide_footer = '''add_rect(slide,0,7.2,13.333,0.3,RGBColor(0x0D,0x47,0x7A)) add_text(slide,"Play Development & Parental Implications | Pediatric Seminar 2026", 0.3,7.2,12,0.3,size=9,color=RGBColor(0xAD,0xD8,0xE6),valign=MSO_ANCHOR.MIDDLE)''' new_ref_slide_footer = '''add_rect(slide,0,7.1,13.333,0.4,RGBColor(0x0D,0x47,0x7A)) add_text(slide,"Play Development & Parental Implications | Pediatric Seminar 2026", 0.3,7.1,12.9,0.4,size=9,color=RGBColor(0xAD,0xD8,0xE6),align=PP_ALIGN.CENTER,valign=MSO_ANCHOR.MIDDLE)''' new_content2 = new_content.replace(old_ref_slide_footer, new_ref_slide_footer) if new_content2 != new_content: print("Fixed references slide footer") else: print("References slide footer not matched - checking...") with open("build_pptx.py", "w") as f: f.write(new_content2) print("Done") EOF
grep -n '7.18\|add_ref_footer\|add_text.*7.18' /tmp/workspace/play-seminar/build_pptx.py
~/play-seminar/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/play-seminar/build_pptx.py'
cd /tmp/workspace/play-seminar && python build_pptx.py 2>&1
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/play-seminar/Play_Development_Seminar.pptx') print(f'Total slides: {len(prs.slides)}') # Check that no shape extends beyond slide height (7.5 inches = 6858000 EMU) from pptx.util import Inches slide_h = prs.slide_height issues = [] for i, slide in enumerate(prs.slides, 1): for shape in slide.shapes: bottom = shape.top + shape.height if bottom > slide_h: issues.append(f'Slide {i}: shape \"{shape.shape_type}\" bottom={bottom/914400:.3f}\" (exceeds {slide_h/914400:.3f}\")') if issues: for iss in issues: print(iss) else: print('All shapes within slide bounds — no overlaps beyond slide edge.') "
Play Development Seminar
Presentation · PPTX
| Problem | Fix |
|---|---|
slide_header() drew a footer bar at y=7.2, h=0.3 | Moved to y=7.1, h=0.4 (taller, higher up) |
Every slide drew a separate add_text at y=7.18 for references | Replaced with a new add_ref_footer() helper that places text inside the same bar |
| Two separate shapes (bar + text box) were stacking on top of each other | Now one bar + one text box, perfectly aligned at the same y-position |
Text height was only 0.25" for 8pt font (too tight, caused clipping) | New helper uses h=0.4" with vertical centering (MSO_ANCHOR.MIDDLE) |
Font was 8pt in a cramped space | Slightly reduced to 7.5pt so even long references fit on one line |
can you add slide with role of play in child development initially and also fix reference problem
~/play-seminar/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/play-seminar/build_pptx.py'
~/play-seminar/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/play-seminar/build_pptx.py'
cd /tmp/workspace/play-seminar && python build_pptx.py 2>&1
python3 -c " from pptx import Presentation from pptx.util import Inches prs = Presentation('/tmp/workspace/play-seminar/Play_Development_Seminar.pptx') print(f'Total slides: {len(prs.slides)}') slide_h = prs.slide_height issues = [] for i, slide in enumerate(prs.slides, 1): title = '' for shape in slide.shapes: if shape.has_text_frame and shape.text_frame.text.strip(): title = shape.text_frame.text.strip()[:55] break # check bounds for shape in slide.shapes: bottom = shape.top + shape.height right = shape.left + shape.width if bottom > slide_h + 5000: issues.append(f' Slide {i} shape bottom={bottom/914400:.3f}in > slide {slide_h/914400:.3f}in') print(f'Slide {i}: {title}') if issues: print() for iss in issues: print(iss) else: print() print('OK - all shapes within bounds') "
Play Development Seminar
Presentation · PPTX
add_ref_footer() to build the text frame from scratch with zero internal margins (margin_left/right/top/bottom = Pt(0))auto_size = None prevents the box from trying to grow beyond the barvertical_anchor = MIDDLE ensures text sits centered within the 0.4" bar heightInches(12.97)) with only a 0.18" left indent — no more clipping or overlapcan you change design and colour theme please
soft pastel
wc -l /tmp/workspace/play-seminar/build_pptx.py
python3 - << 'EOF' with open('/tmp/workspace/play-seminar/build_pptx.py', 'r') as f: content = f.read() # ── 1. Replace entire color palette block ────────────────────────────────── old_palette = """# ── Color palette (pediatric pastel theme) ──────────────────────────────────── C_TITLE_BG = RGBColor(0x1A, 0x6B, 0xB0) # deep pediatric blue C_HEADER_BG = RGBColor(0x2E, 0x86, 0xC1) # medium blue C_ACCENT = RGBColor(0xFF, 0xB7, 0x26) # warm yellow/orange C_ACCENT2 = RGBColor(0x27, 0xAE, 0x60) # green C_ACCENT3 = RGBColor(0xE7, 0x4C, 0x3C) # coral/red C_LIGHT_BG = RGBColor(0xE8, 0xF4, 0xFD) # very light blue C_WHITE = RGBColor(0xFF, 0xFF, 0xFF) C_DARK = RGBColor(0x1A, 0x25, 0x2F) C_BODY_TEXT = RGBColor(0x17, 0x20, 0x2A) C_ROW_ALT = RGBColor(0xD6, 0xEA, 0xF8) C_YELLOW_BG = RGBColor(0xFF, 0xF3, 0xCD) C_GREEN_BG = RGBColor(0xD5, 0xF5, 0xE3) C_RED_BG = RGBColor(0xFD, 0xED, 0xEC)""" new_palette = """# ── Color palette (soft pastel pediatric theme) ────────────────────────────── # Header / title bars: soft sage green C_TITLE_BG = RGBColor(0x6B, 0xA3, 0x8A) # sage green (title/footer bars) C_HEADER_BG = RGBColor(0x88, 0xBB, 0xA4) # lighter sage green (slide headers) # Accent colors: soft pastels C_ACCENT = RGBColor(0xF9, 0xA8, 0x8A) # soft peach/salmon C_ACCENT2 = RGBColor(0xA8, 0xD8, 0xC2) # mint green C_ACCENT3 = RGBColor(0xC3, 0xA8, 0xD4) # soft lavender # Backgrounds C_LIGHT_BG = RGBColor(0xF5, 0xF0, 0xFA) # very light lavender-cream (slide bg) C_WHITE = RGBColor(0xFF, 0xFF, 0xFF) # Text C_DARK = RGBColor(0x3A, 0x3A, 0x4A) # soft near-black (easy on eyes) C_BODY_TEXT = RGBColor(0x3A, 0x3A, 0x4A) # Table alternating row C_ROW_ALT = RGBColor(0xEA, 0xF6, 0xF0) # very light mint # Utility backgrounds C_YELLOW_BG = RGBColor(0xFD, 0xF3, 0xE7) # soft warm cream C_GREEN_BG = RGBColor(0xE8, 0xF6, 0xEF) # soft mint C_RED_BG = RGBColor(0xF9, 0xEC, 0xF0) # soft blush""" content = content.replace(old_palette, new_palette) assert new_palette in content, "palette replacement failed" # ── 2. Title slide: replace deep blue bg + plain accent with pastel gradient-feel ── old_title_bg = "add_rect(slide, 0, 0, 13.333, 7.5, C_TITLE_BG)" new_title_bg = """# Pastel layered background add_rect(slide, 0, 0, 13.333, 7.5, RGBColor(0xF5, 0xF0, 0xFA)) # light lavender-cream base add_rect(slide, 0, 0, 13.333, 3.8, RGBColor(0x88, 0xBB, 0xA4)) # sage green upper band add_rect(slide, 0, 3.7, 13.333, 0.18, RGBColor(0xF9, 0xA8, 0x8A)) # peach divider stripe""" content = content.replace(old_title_bg, new_title_bg) # ── 3. Title slide bubble colors — use pastel versions ── old_bubbles = """for cx, cy, cr, cc in [(1.2,1.0,0.7,C_ACCENT),(12.5,6.5,0.5,C_ACCENT2), (0.4,6.2,0.4,C_ACCENT3),(12.2,1.2,0.6,C_ACCENT)]:""" new_bubbles = """for cx, cy, cr, cc in [(1.2,1.0,0.7,RGBColor(0xF9,0xA8,0x8A)), (12.5,6.5,0.5,RGBColor(0xA8,0xD8,0xC2)), (0.4,6.2,0.4,RGBColor(0xC3,0xA8,0xD4)), (12.2,1.2,0.6,RGBColor(0xFD,0xE6,0xB8))]:""" content = content.replace(old_bubbles, new_bubbles) # ── 4. Title slide text colors ── # Main title: change C_WHITE to dark text since upper band is sage green (light enough) # Keep white — sage header is medium value so white is fine # Subtitle text color C_ACCENT -> keep peach, just ensure it's readable on sage # Presenter line: change light-blue to soft lavender old_presenter = "color=RGBColor(0xAD,0xD8,0xE6)," new_presenter = "color=RGBColor(0xF5,0xF0,0xFA)," content = content.replace(old_presenter, new_presenter, 1) # ── 5. Divider stripe on title: change C_ACCENT rect to peach ── old_divider = "add_rect(slide,1.5,4.5,10.333,0.05,C_ACCENT)" new_divider = "add_rect(slide,1.5,4.5,10.333,0.05,RGBColor(0xF9,0xA8,0x8A))" content = content.replace(old_divider, new_divider) # ── 6. slide_header subtitle bar: change C_ACCENT to soft peach ── old_sub_bar = "add_rect(slide, 0, 1.1, 13.333, 0.32, C_ACCENT)" new_sub_bar = "add_rect(slide, 0, 1.1, 13.333, 0.32, RGBColor(0xF9, 0xA8, 0x8A))" content = content.replace(old_sub_bar, new_sub_bar) # subtitle text: dark on peach is fine — keep C_DARK # ── 7. References slide: deep navy bg -> soft sage ── old_ref_bg = "add_rect(slide,0,0,13.333,7.5,C_TITLE_BG)" # This appears once per slide (all other slides use C_LIGHT_BG), references uses C_TITLE_BG # But C_TITLE_BG is now sage green — that's fine, just change the header bar old_ref_hdr = "add_rect(slide,0,0,13.333,1.1,RGBColor(0x0D,0x47,0x7A))" new_ref_hdr = "add_rect(slide,0,0,13.333,1.1,RGBColor(0x5A,0x8C,0x73))" content = content.replace(old_ref_hdr, new_ref_hdr) old_ref_footer2 = "add_rect(slide,0,7.1,13.333,0.4,RGBColor(0x0D,0x47,0x7A))" new_ref_footer2 = "add_rect(slide,0,7.1,13.333,0.4,RGBColor(0x5A,0x8C,0x73))" content = content.replace(old_ref_footer2, new_ref_footer2) old_ref_text_color = "color=RGBColor(0xAD,0xD8,0xE6),align=PP_ALIGN.CENTER" new_ref_text_color = "color=RGBColor(0xF5,0xF0,0xFA),align=PP_ALIGN.CENTER" content = content.replace(old_ref_text_color, new_ref_text_color) # ── 8. Learning objectives accent squares: C_ACCENT -> peach ── # These are inline add_rect(slide,0.4,y,0.4,0.5,C_ACCENT) — C_ACCENT is already peach now # ── 9. Domain box colors in "Role of Play" slide — replace hard blues with pastels ── old_domains = """domains = [ ("Cognitive\\nDevelopment", C_TITLE_BG,""" new_domains = """domains = [ ("Cognitive\\nDevelopment", RGBColor(0x88,0xBB,0xA4),""" content = content.replace(old_domains, new_domains) old_d2 = '("Language &\\nCommunication", C_HEADER_BG,' new_d2 = '("Language &\\nCommunication", RGBColor(0xC3,0xA8,0xD4),' content = content.replace(old_d2, new_d2) old_d4 = '("Physical /\\nMotor", C_ACCENT2,' new_d4 = '("Physical /\\nMotor", RGBColor(0xA8,0xD8,0xC2),' content = content.replace(old_d4, new_d4) old_d5 = '("Creative &\\nImagination", RGBColor(0x85,0x44,0xBF),' new_d5 = '("Creative &\\nImagination", RGBColor(0xF9,0xA8,0x8A),' content = content.replace(old_d5, new_d5) old_d6 = '("Resilience &\\nMental Health",RGBColor(0xD4,0x52,0x00),' new_d6 = '("Resilience &\\nMental Health",RGBColor(0xF0,0xC4,0x7A),' content = content.replace(old_d6, new_d6) # ── 10. Piaget stage detail slides — accent colors in piaget_stage_slide calls ── # The accent passed as last arg to piaget_stage_slide, update hard-coded ones old_p1 = " C_ACCENT)" # these appear as last arg in the piaget_stage_slide calls — keep C_ACCENT (now peach) old_p4 = " RGBColor(0x85,0x44,0xBF))" new_p4 = " RGBColor(0xC3,0xA8,0xD4))" content = content.replace(old_p4, new_p4) old_p5_color = " RGBColor(0x17,0x7D,0xC2))" new_p5_color = " RGBColor(0x88,0xBB,0xA4))" # Only replace in piaget stage calls (there are 2 occurrences — one in stage 5, one in special pops col) # Be careful — use count import re # Replace only in piaget_stage_slide function calls (they end with a single closing paren on own line) content = content.replace(" RGBColor(0x17,0x7D,0xC2))\n\n# Stage 6", " RGBColor(0x88,0xBB,0xA4))\n\n# Stage 6") # ── 11. Special populations column colors ── old_sp1 = '("Autism Spectrum\\nDisorder (ASD)",C_ACCENT3,' new_sp1 = '("Autism Spectrum\\nDisorder (ASD)",RGBColor(0xC3,0xA8,0xD4),' content = content.replace(old_sp1, new_sp1) old_sp2 = '("ADHD",C_ACCENT,' new_sp2 = '("ADHD",RGBColor(0xF9,0xA8,0x8A),' content = content.replace(old_sp2, new_sp2) old_sp3 = '("Cerebral Palsy /\\nPhysical Disability",RGBColor(0x17,0x7D,0xC2),' new_sp3 = '("Cerebral Palsy /\\nPhysical Disability",RGBColor(0x88,0xBB,0xA4),' content = content.replace(old_sp3, new_sp3) old_sp4 = '("Language\\nDisorder / Hearing Loss",RGBColor(0x85,0x44,0xBF),' new_sp4 = '("Language\\nDisorder / Hearing Loss",RGBColor(0xF0,0xC4,0x7A),' content = content.replace(old_sp4, new_sp4) old_sp5 = '("Premature /\\nMedically Fragile",C_ACCENT2,' new_sp5 = '("Premature /\\nMedically Fragile",RGBColor(0xA8,0xD8,0xC2),' content = content.replace(old_sp5, new_sp5) # ── 12. Well-child visit column colors ── old_wc1 = '("Newborn–\\n6 months",C_ACCENT,' new_wc1 = '("Newborn–\\n6 months",RGBColor(0xF9,0xA8,0x8A),' content = content.replace(old_wc1, new_wc1) old_wc2 = '("6–12\\nmonths",C_ACCENT3,' new_wc2 = '("6–12\\nmonths",RGBColor(0xC3,0xA8,0xD4),' content = content.replace(old_wc2, new_wc2) old_wc3 = '("12–24\\nmonths",RGBColor(0x8E,0x44,0xAD),' new_wc3 = '("12–24\\nmonths",RGBColor(0xA8,0xD8,0xC2),' content = content.replace(old_wc3, new_wc3) old_wc4 = '("2–3\\nyears",RGBColor(0x17,0x7D,0xC2),' new_wc4 = '("2–3\\nyears",RGBColor(0x88,0xBB,0xA4),' content = content.replace(old_wc4, new_wc4) old_wc5 = '("3–5\\nyears",C_ACCENT2,' new_wc5 = '("3–5\\nyears",RGBColor(0xF0,0xC4,0x7A),' content = content.replace(old_wc5, new_wc5) old_wc6 = '("6–12\\nyears",RGBColor(0x1A,0x6B,0xB0),' new_wc6 = '("6–12\\nyears",RGBColor(0xC3,0xA8,0xD4),' content = content.replace(old_wc6, new_wc6) # ── 13. Parent roles column colors ── old_pr_colors = "colors = [C_ACCENT, C_ACCENT3, RGBColor(0x85,0x44,0xBF), C_ACCENT2, RGBColor(0x17,0x7D,0xC2)]" new_pr_colors = "colors = [RGBColor(0xF9,0xA8,0x8A), RGBColor(0xC3,0xA8,0xD4), RGBColor(0xA8,0xD8,0xC2), RGBColor(0xF0,0xC4,0x7A), RGBColor(0x88,0xBB,0xA4)]" content = content.replace(old_pr_colors, new_pr_colors) # ── 14. Red flags top warning bar (keep attention-getting but softer) ── old_rf_bar = "add_rect(slide,0.3,1.55,12.7,0.5,C_ACCENT3)" new_rf_bar = "add_rect(slide,0.3,1.55,12.7,0.5,RGBColor(0xC3,0xA8,0xD4))" content = content.replace(old_rf_bar, new_rf_bar) old_rf_age = "add_rect(slide,xc,yc,1.38,1.18,C_ACCENT3)" new_rf_age = "add_rect(slide,xc,yc,1.38,1.18,RGBColor(0xC3,0xA8,0xD4))" content = content.replace(old_rf_age, new_rf_age) old_rf_row1 = "bgc = C_RED_BG if row % 2 == 0 else C_YELLOW_BG" new_rf_row1 = "bgc = RGBColor(0xF9,0xEC,0xF0) if row % 2 == 0 else RGBColor(0xFD,0xF3,0xE7)" content = content.replace(old_rf_row1, new_rf_row1) # ── 15. Table header colors — use sage green instead of deep blue ── # add_table calls pass hdr_bg explicitly or default; update defaults in function signature old_tbl_sig = "def add_table(slide, headers, rows, x, y, w, h,\n hdr_bg=C_HEADER_BG, hdr_txt=C_WHITE, alt_bg=C_ROW_ALT):" # C_HEADER_BG and C_ROW_ALT are already updated in the palette, so this is fine with open('/tmp/workspace/play-seminar/build_pptx.py', 'w') as f: f.write(content) print("All color replacements done.") EOF
~/play-seminar/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/play-seminar/build_pptx.py'
~/play-seminar/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/play-seminar/build_pptx.py'
grep -n 'C_TITLE_BG\|0x0D,0x47\|0x5A,0x8C\|Presented by' /tmp/workspace/play-seminar/build_pptx.py | head -20
~/play-seminar/build_pptx.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/play-seminar/build_pptx.py'
cd /tmp/workspace/play-seminar && python build_pptx.py 2>&1
python3 -c " from pptx import Presentation prs = Presentation('/tmp/workspace/play-seminar/Play_Development_Seminar.pptx') slide_h = prs.slide_height issues = [] for i, slide in enumerate(prs.slides, 1): for shape in slide.shapes: if shape.top + shape.height > slide_h + 5000: issues.append(f'Slide {i} overflow') print(f'{len(prs.slides)} slides — ' + ('All shapes within bounds.' if not issues else str(issues))) "
Play Development Seminar
Presentation · PPTX
| Element | Old (deep blue) | New (soft pastel) |
|---|---|---|
| Slide background | Light blue #E8F4FD | Lavender-cream #F5F0FA |
| Header bar | Deep navy #1A6BB0 | Soft sage green #88BBA4 |
| Left accent stripe | None | Peach #F9A88A (on every header) |
| Subtitle band | Bright orange | Light lavender #EEE5F6 with lavender left stripe |
| Footer bar | Deep blue | Sage green #6BA38A |
| Table headers | Dark blue | Sage green |
| Table alternating rows | Blue tint | Soft mint #EAF6F0 |
| Domain/column accents | Saturated blues/greens/purples | Soft peach, mint, lavender, warm yellow |
| Red flags alert bar | Bright red | Soft lavender (less alarming, still distinct) |
| References slide bg | Dark sage green (text was white) | Warm cream #FDF8FF with dark text (easier to read) |
thank you orris
Play Development Seminar
Presentation · PPTX