Create a ppt on headache?

Reading File
Reading File
What audience should the headache presentation target?
Asking for Preferences

Choose the intended audience and style.

What audience should the headache presentation target?
Browsing Directory

~/

Reading File
Finding Sources
Finding Sources
Searching PubMed

headache AND treatment

Searching the Web

International Headache Society headache red flags migraine tension-type headache patient information

Reading File
Reading File
Searching Images

medical diagram migraine tension type cluster headache features illustration

Finding Sources
Running Command

mkdir -p "/tmp/workspace/headache-ppt/src" "/tmp/workspace/headache-ppt/output" && python -c "import pptx; print('python-pptx ready')"

Running Command

python - <<'PY' from pathlib import Path p=Path('/tmp/workspace/headache-ppt/src/create_headache_deck.py') p.write_text(r'''from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.shapes import MSO_SHAPE from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.enum.dml import MSO_THEME_COLOR OUT='/tmp/workspace/headache-ppt/output/Headache_Essentials.pptx' prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] # palette NAVY=RGBColor(20,42,72); BLUE=RGBColor(37,99,235); TEAL=RGBColor(13,148,136); SKY=RGBColor(224,242,254); PALE=RGBColor(240,249,255); INK=RGBColor(26,36,51); MUTED=RGBColor(84,103,125); RED=RGBColor(220,38,38); AMBER=RGBColor(217,119,6); WHITE=RGBColor(255,255,255); LINE=RGBColor(203,213,225); PURPLE=RGBColor(124,58,237) def rect(s,x,y,w,h,color, radius=False, line=None): sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if radius else MSO_SHAPE.RECTANGLE, Inches(x),Inches(y),Inches(w),Inches(h)) sh.fill.solid(); sh.fill.fore_color.rgb=color sh.line.color.rgb=line if line else color return sh def text(s,txt,x,y,w,h,size=20,color=INK,bold=False,align=PP_ALIGN.LEFT, valign=MSO_ANCHOR.TOP, font='Aptos'): sh=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=sh.text_frame; tf.clear(); tf.word_wrap=True tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0.04*Inches(1) tf.vertical_anchor=valign for i,line in enumerate(txt.split('\n')): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=line; p.alignment=align; p.space_after=Pt(4) for r in p.runs: r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color return sh def title(s,kicker,heading,sub=None,n=0): text(s,kicker.upper(),0.65,0.36,8,.28,11,TEAL,True) text(s,heading,0.65,0.68,11.9,.65,28,NAVY,True) if sub: text(s,sub,0.67,1.37,11.7,.45,12,MUTED) rect(s,.65,1.94,12.02,.018,LINE) text(s,f'{n:02d}',12.28,.32,.45,.28,11,TEAL,True,PP_ALIGN.RIGHT) def foot(s,txt='Educational overview - symptoms need individual assessment'): text(s,txt,.65,7.15,11.8,.18,9,MUTED) def card(s,x,y,w,h,head,body,accent=BLUE, icon=None): rect(s,x,y,w,h,WHITE,True,LINE); rect(s,x,y,.08,h,accent) if icon: text(s,icon,x+.25,y+.25,.4,.4,23,accent,True,PP_ALIGN.CENTER) text(s,head,x+.28+(0.45 if icon else 0),y+.25,w-.5-(.45 if icon else 0),.34,16,NAVY,True) text(s,body,x+.28,y+.76,w-.52,h-.9,12,INK) def bullet_list(s,items,x,y,w,h,size=17,color=INK): sh=s.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=sh.text_frame; tf.clear(); tf.word_wrap=True tf.margin_left=Inches(.05); tf.margin_right=Inches(.03) for i,item in enumerate(items): p=tf.paragraphs[0] if i==0 else tf.add_paragraph(); p.text=item; p.level=0; p.font.size=Pt(size); p.font.name='Aptos'; p.font.color.rgb=color; p.space_after=Pt(11); p.bullet=True return sh # 1 s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,NAVY); rect(s,0,0,13.333,.16,TEAL) # concentric abstract head/pain circles for x,y,r,c,a in [(10.8,1.1,1.75,RGBColor(31,78,121),0),(10.5,1.45,1.35,BLUE,0),(10.85,1.75,.75,SKY,0)]: sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x), Inches(y), Inches(r), Inches(r)); sh.fill.solid(); sh.fill.fore_color.rgb=c; sh.line.color.rgb=c text(s,'HEADACHE',.75,1.22,7,.45,15,RGBColor(94,234,212),True) text(s,'Headache\nEssentials',.72,1.78,7.5,1.75,38,WHITE,True) text(s,'Recognize common patterns, use simple self-care safely, and know when to seek urgent help.',.76,3.85,7.35,.85,18,RGBColor(226,232,240)) rect(s,.75,5.42,4.85,.72,TEAL,True); text(s,'General public education',1.02,5.64,4.25,.2,14,WHITE,True,PP_ALIGN.CENTER) text(s,'For education only. Not a diagnosis or a substitute for clinical care.',.77,6.82,8,.22,10,RGBColor(148,163,184)) # 2 s=prs.slides.add_slide(blank); title(s,'The big picture','What is a headache?','Pain is felt in and around the head, face or upper neck.',2) text(s,'Most headaches are primary disorders',.7,2.35,5.8,.45,22,NAVY,True) text(s,'They are not caused by another illness. The common examples are migraine, tension-type headache, and cluster headache.',.7,2.95,5.65,1.15,17,INK) text(s,'A smaller number are secondary',.7,4.55,5.8,.45,22,NAVY,True) text(s,'They are linked to another condition. New or unusual warning features should be assessed.',.7,5.15,5.65,.82,17,INK) # split graphic rect(s,7.0,2.15,5.55,4.2,PALE,True) for yy,lab,col,pct in [(2.78,'Primary headache',BLUE,4.1),(4.15,'Secondary headache',AMBER,1.3)]: text(s,lab,7.45,yy,2.1,.3,16,NAVY,True); rect(s,9.7,yy,2.1,.28,RGBColor(226,232,240),True); rect(s,9.7,yy,pct,.28,col,True) text(s,'The pattern and accompanying symptoms guide next steps.',7.45,5.35,4.45,.55,13,MUTED) foot(s) #3 s=prs.slides.add_slide(blank); title(s,'Common patterns','Three primary headache types','Patterns overlap. A clinician makes the diagnosis.',3) card(s,.68,2.35,3.85,3.8,'Tension-type','Often bilateral, pressing or tightening, mild to moderate. May relate to stress. Usually no prominent nausea.',TEAL,'◉') card(s,4.75,2.35,3.85,3.8,'Migraine','Often one-sided and pulsating, moderate to severe. Activity can worsen it. Nausea and light or sound sensitivity are common.',BLUE,'≈') card(s,8.82,2.35,3.85,3.8,'Cluster','Very severe pain around one eye. Tearing, eye redness or nasal symptoms on the same side may occur in attacks.',PURPLE,'◌') foot(s,'Source: Frameworks for Internal Medicine, primary headache disorders') #4 s=prs.slides.add_slide(blank); title(s,'Migraine','More than “just a bad headache”','Migraine may occur with or without aura.',4) # timeline text(s,'A migraine attack can involve several phases',.72,2.3,6,.35,21,NAVY,True) steps=[('1','Early changes','Tiredness, mood or food changes'),('2','Aura for some','Temporary visual, sensory or speech symptoms'),('3','Headache','Pulsating pain, nausea, light and sound sensitivity'),('4','Recovery','Fatigue or “brain fog” after the pain')] for i,(num,h,b) in enumerate(steps): x=.8+i*3.05; rect(s,x,3.12,2.55,2.25,WHITE,True,LINE); sh=s.shapes.add_shape(MSO_SHAPE.OVAL,Inches(x+.18),Inches(3.34),Inches(.5),Inches(.5)); sh.fill.solid(); sh.fill.fore_color.rgb=BLUE; sh.line.color.rgb=BLUE; text(s,num,x+.18,3.46,.5,.14,12,WHITE,True,PP_ALIGN.CENTER); text(s,h,x+.82,3.34,1.5,.32,15,NAVY,True); text(s,b,x+.25,4.13,2.05,.72,12,INK) text(s,'Aura symptoms should be new, fully reversible, and assessed if they are new or atypical.',.78,6.15,11.8,.35,14,AMBER,True) foot(s) #5 s=prs.slides.add_slide(blank); title(s,'When to act now','Urgent headache warning signs','Seek emergency care or local emergency services for any of these.',5) warn=[('Sudden peak pain','A “thunderclap” headache that becomes maximal within seconds to a minute.'),('Neurologic change','Weakness, numbness, new confusion, fainting, seizure, trouble speaking or vision loss.'),('Illness or stiff neck','Fever, rash, neck stiffness, persistent vomiting, or severe drowsiness.'),('High-risk context','After head injury; during pregnancy/postpartum; with cancer, immune suppression, or blood-thinning medicines.'),('New pattern','New after age 40-50, clearly worsening, or substantially different from usual headaches.')] for i,(h,b) in enumerate(warn): x=.75+(i%2)*6.15; y=2.25+(i//2)*1.38 if i==4: x=3.82; y=5.01 rect(s,x,y,5.65 if i<4 else 5.7,1.08,RGBColor(254,242,242),True,RGBColor(252,165,165)); text(s,'!',x+.25,y+.26,.38,.38,22,RED,True,PP_ALIGN.CENTER); text(s,h,x+.77,y+.21,4.5,.26,15,RED,True); text(s,b,x+.77,y+.52,4.56,.35,11,INK) foot(s,'A sudden severe headache warrants immediate assessment.') #6 s=prs.slides.add_slide(blank); title(s,'Self-care','What may help a familiar, mild headache','If a headache is new, severe, or has warning signs, do not self-manage only.',6) items=[('Hydrate and eat regularly','Dehydration or missed meals can be personal triggers.'),('Rest in a calm setting','A dark, quiet room can help during a migraine attack.'),('Use a cold or warm pack','Try what is comfortable on the head, neck, or shoulders.'),('Gentle movement and sleep routine','Regular activity and consistent sleep can reduce triggers for some people.'),('Use pain medicines carefully','Follow the label or clinician advice. Frequent use can contribute to medication-overuse headache.')] for i,(h,b) in enumerate(items): x=.75+(i%2)*6.05; y=2.25+(i//2)*1.32 if i==4: x=3.78; y=4.89 card(s,x,y,5.55,1.05,h,b,TEAL if i%2==0 else BLUE) foot(s) #7 s=prs.slides.add_slide(blank); title(s,'Prevention','Find your pattern, not a universal trigger list','Triggers differ between people. A diary can reveal useful links.',7) rect(s,.75,2.28,4.0,3.95,PALE,True); text(s,'Simple headache diary',1.05,2.62,3.4,.35,22,NAVY,True) bullet_list(s,['Date and time','Duration and severity','Symptoms and location','Sleep, meals, hydration, stress','Medicine taken and response'],1.1,3.28,3.2,2.45,15) text(s,'Review it after several weeks.',1.05,5.78,3.2,.25,13,TEAL,True) for i,(h,b) in enumerate([('Regular routines','Sleep, meals, fluid intake, and movement.'),('Early plan','Know what to do when symptoms begin.'),('Clinical review','Discuss frequent, disabling or changing headaches.')]): card(s,5.25,2.32+i*1.25,6.8,1.0,h,b,[BLUE,TEAL,PURPLE][i]) foot(s) #8 s=prs.slides.add_slide(blank); title(s,'Medicines','Avoid the medication-overuse cycle','Pain medicines can be helpful. Using acute headache medicines too often can perpetuate headaches.',8) rect(s,.75,2.35,3.4,3.45,RGBColor(255,251,235),True,RGBColor(253,230,138)); text(s,'1',1.05,2.72,.45,.3,24,AMBER,True); text(s,'Headache begins',1.63,2.74,2.1,.28,17,NAVY,True) text(s,'2',1.05,3.65,.45,.3,24,AMBER,True); text(s,'Acute medicine gives short-term relief',1.63,3.63,2.0,.58,15,INK) text(s,'3',1.05,4.78,.45,.3,24,AMBER,True); text(s,'Frequent use may lead to more headache days',1.63,4.72,2.0,.6,15,INK) text(s,'Safer approach',4.75,2.35,3,.35,23,NAVY,True) bullet_list(s,['Use only as directed on the label or by a clinician.','Ask about a migraine-specific treatment plan if attacks are recurrent.','Seek advice before escalating use, especially if headaches are frequent.'],4.75,3.05,6.7,2.15,17) rect(s,4.75,5.62,6.85,.53,SKY,True); text(s,'Do not start, stop, or combine prescription medicines based on this slide.',4.98,5.8,6.35,.18,12,NAVY,True,PP_ALIGN.CENTER) foot(s) #9 s=prs.slides.add_slide(blank); title(s,'Talk with a clinician','When a routine appointment is a good idea','You deserve a plan when headaches interfere with life.',9) qs=['Headaches occur often, are becoming more frequent, or disrupt work/school.','You need pain medicine repeatedly or it is not working as expected.','Migraine symptoms are disabling, or symptoms occur with aura.','You are pregnant, postpartum, have new medical conditions, or take new medicines.'] bullet_list(s,qs,.8,2.35,7.0,3.4,18) rect(s,8.45,2.38,3.8,3.45,PALE,True); text(s,'Bring your diary',8.8,2.75,3.0,.33,21,NAVY,True) text(s,'Useful details:\n• timing and duration\n• symptoms\n• triggers you suspect\n• medicines and response\n• family history',8.85,3.42,2.9,1.8,15,INK) foot(s) #10 s=prs.slides.add_slide(blank); title(s,'Key takeaways','A clear next step for every headache','Recognize the pattern. Notice changes. Act on warning signs.',10) for i,(num,h,b,c) in enumerate([('01','Most headaches are primary','Migraine, tension-type, and cluster are common patterns.',TEAL),('02','Warning signs change the plan','Sudden, severe, new, or neurologic symptoms need urgent assessment.',RED),('03','A diary supports better care','Track symptoms and medicine use, then discuss frequent or disabling headaches.',BLUE)]): x=.78+i*4.14; rect(s,x,2.55,3.72,2.65,WHITE,True,LINE); text(s,num,x+.28,2.86,1,.27,18,c,True); text(s,h,x+.28,3.42,3.05,.6,19,NAVY,True); text(s,b,x+.28,4.35,3.05,.52,13,INK) text(s,'References',.78,5.9,1.5,.24,13,NAVY,True) text(s,'Frameworks for Internal Medicine, primary headache disorders, pp. 8074-8135. Goldman-Cecil Medicine, “Headaches and Other Head Pain,” p. 367. ICHD-3 classification outline (International Headache Society).',.78,6.18,11.8,.45,10,MUTED) foot(s,'Prepared August 2026 - educational material only') # set core props prs.core_properties.title='Headache Essentials'; prs.core_properties.subject='General public education'; prs.core_properties.author='Orris'; prs.save(OUT) print(OUT) ''') PY python "/tmp/workspace/headache-ppt/src/create_headache_deck.py" python - <<'PY' from pptx import Presentation p='/tmp/workspace/headache-ppt/output/Headache_Essentials.pptx'; prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): print(i, sum(1 for sh in s.shapes if getattr(sh,'has_text_frame',False))) PY

Running Command

python - <<'PY' p='/tmp/workspace/headache-ppt/src/create_headache_deck.py' s=open(p).read() s=s.replace("tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0.04*Inches(1)","tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=Inches(0.04)") open(p,'w').write(s) PY python "/tmp/workspace/headache-ppt/src/create_headache_deck.py" && python - <<'PY' from pptx import Presentation p='/tmp/workspace/headache-ppt/output/Headache_Essentials.pptx'; prs=Presentation(p) print('slides',len(prs.slides)) for i,s in enumerate(prs.slides,1): print(f'{i}: shapes={len(s.shapes)}') PY

Running Command

python - <<'PY' from pptx import Presentation from pathlib import Path p=Path('/tmp/workspace/headache-ppt/output/Headache_Essentials.pptx') prs=Presentation(str(p)) assert len(prs.slides)==10 for idx, slide in enumerate(prs.slides,1): texts=[sh.text.strip() for sh in slide.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip()] assert texts, f'blank slide {idx}' print(idx, texts[0][:45]) print('verified:', p.exists(), p.stat().st_size, 'bytes') PY

Created a 10-slide general-audience presentation on headache, including common headache types, migraine features, urgent red flags, self-care, prevention, medication overuse, and when to consult a clinician.

Headache Essentials

Presentation · PPTX

This is a shared conversation. Sign in to Orris to start your own chat.