Give me this in ppt slide form with pictures and front times of network 24 in size
~/
~/attachments/
pemphigus AND pemphigoid
pemphigus pemphigoid clinical images DermNet
~/attachments/c1b14ca3-f2c2-451a-a72d-ee2e568af3f0
mkdir -p "/tmp/workspace/pemphigus-pemphigoid-presentation/src" "/tmp/workspace/pemphigus-pemphigoid-presentation/output" "/tmp/workspace/pemphigus-pemphigoid-presentation/assets" && python "/tmp/skills/shared/scripts/fetch_images.py" "https://dermnetnz.org/assets/collection/Pemphigus-vulgaris/pemphigus-vulgaris-0001.jpg" "https://dermnetnz.org/assets/Uploads/immune/pemphigoid-bullous/3360.jpg" > "/tmp/workspace/pemphigus-pemphigoid-presentation/assets/web_images.json"
python -c "import base64,json,os; p='/tmp/workspace/pemphigus-pemphigoid-presentation/assets/web_images.json'; d=json.load(open(p)); [open(f'/tmp/workspace/pemphigus-pemphigoid-presentation/assets/web_{i}.jpg','wb').write(base64.b64decode(x['base64'].split(',',1)[1])) for i,x in enumerate(d)]" && python -c "from PIL import Image; import glob; [print(f, Image.open(f).size) for f in glob.glob('/tmp/workspace/attachments/c1b14ca3-f2c2-451a-a72d-ee2e568af3f0/*.jpg')+glob.glob('/tmp/workspace/pemphigus-pemphigoid-presentation/assets/web_*.jpg')]"
.../src/create_presentation.py
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE
from pptx.dml.color import RGBColor
from PIL import Image
import os
ROOT='/tmp/workspace/pemphigus-pemphigoid-presentation'
ASSETS=os.path.join(ROOT,'assets')
OUT=os.path.join(ROOT,'output','Pemphigus_and_Pemphigoid.pptx')
BOOK='/tmp/workspace/attachments/c1b14ca3-f2c2-451a-a72d-ee2e568af3f0'
prs=Presentation()
prs.slide_width=Inches(13.333)
prs.slide_height=Inches(7.5)
blank=prs.slide_layouts[6]
NAVY=RGBColor(35,57,77); TEAL=RGBColor(41,132,139); PALE=RGBColor(239,246,246)
INK=RGBColor(35,43,51); MUTED=RGBColor(90,103,112); WHITE=RGBColor(255,255,255)
# All body text is Times New Roman, 24 pt per request.
def add_text(slide, text, x,y,w,h, size=24, color=INK, bold=False, align=PP_ALIGN.LEFT):
box=slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
tf=box.text_frame; tf.clear(); tf.word_wrap=True
tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0
tf.vertical_anchor=MSO_ANCHOR.TOP
for i,line in enumerate(text.split('\n')):
p=tf.paragraphs[0] if i==0 else tf.add_paragraph()
p.text=line; p.font.name='Times New Roman'; p.font.size=Pt(size); p.font.bold=bold
p.font.color.rgb=color; p.alignment=align
p.space_after=Pt(6)
return box
def bg(slide, title, n):
fill=slide.background.fill; fill.solid(); fill.fore_color.rgb=WHITE
band=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,0,prs.slide_width,Inches(.68))
band.fill.solid(); band.fill.fore_color.rgb=NAVY; band.line.fill.background()
add_text(slide,title,.48,.12,11.6,.4,28,WHITE,True)
add_text(slide,str(n),12.25,.15,.55,.3,16,WHITE,True,PP_ALIGN.RIGHT)
line=slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, Inches(.48), Inches(.82), Inches(12.35), Inches(.05))
line.fill.solid(); line.fill.fore_color.rgb=TEAL; line.line.fill.background()
def cover_crop(slide, path, x,y,w,h):
im=Image.open(path); iw,ih=im.size; ar=w/h; iar=iw/ih
# Crop image to fit, centered
if iar>ar:
cropw=int(ih*ar); left=(iw-cropw)//2; box=(left,0,left+cropw,ih)
else:
croph=int(iw/ar); top=(ih-croph)//2; box=(0,top,iw,top+croph)
tmp=os.path.join(ASSETS,'crop_'+os.path.basename(path))
im.crop(box).save(tmp)
slide.shapes.add_picture(tmp, Inches(x), Inches(y), width=Inches(w), height=Inches(h))
def card(slide, title, bullets, x,y,w,h):
sh=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(x),Inches(y),Inches(w),Inches(h))
sh.fill.solid(); sh.fill.fore_color.rgb=PALE; sh.line.color.rgb=RGBColor(190,215,215)
add_text(slide,title,x+.22,y+.16,w-.44,.38,24,TEAL,True)
add_text(slide,'\n'.join('• '+b for b in bullets),x+.22,y+.68,w-.44,h-.82,24,INK)
# 1
s=prs.slides.add_slide(blank)
cover_crop(s, os.path.join(ASSETS,'web_0.jpg'), 7.45,0,5.883,7.5)
shade=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,Inches(7.45),0,Inches(5.883),prs.slide_height); shade.fill.solid(); shade.fill.fore_color.rgb=NAVY; shade.fill.transparency=50; shade.line.fill.background()
add_text(s,'Pemphigus\nand Pemphigoid',.7,1.2,6.4,1.45,34,NAVY,True)
add_text(s,'Autoimmune blistering disorders\nPresentation based on the supplied textbook pages',.72,3.1,6.1,1.0,24,MUTED)
add_text(s,'Pemphigus: flaccid, intraepidermal blisters\nPemphigoid: tense, subepidermal blisters',.72,5.15,6.1,1.0,24,TEAL,True)
add_text(s,'Clinical image: DermNet',.72,6.85,3,.25,16,MUTED)
# 2
s=prs.slides.add_slide(blank); bg(s,'Core distinction',2)
card(s,'Pemphigus',['Autoantibodies against desmogleins (Dsg1/Dsg3).','Loss of keratinocyte adhesion causes acantholysis.','Intraepidermal blister: typically flaccid and easily ruptured.'],.55,1.2,5.85,4.85)
card(s,'Pemphigoid',['Autoantibodies target basement membrane zone proteins, including BP180 and BP230.','Inflammation separates epidermis from dermis.','Subepidermal blister: typically large and tense.'],6.92,1.2,5.85,4.85)
add_text(s,'Exam clue: Flaccid = pemphigus; tense = pemphigoid.',.65,6.45,12,.4,24,TEAL,True,PP_ALIGN.CENTER)
# 3
s=prs.slides.add_slide(blank); bg(s,'Pemphigus: introduction and pathophysiology',3)
add_text(s,'An autoimmune bullous disease of skin and mucous membranes.',.62,1.08,7.0,.4,24,TEAL,True)
card(s,'Mechanism',['IgG autoantibodies target Dsg1 and/or Dsg3.','Keratinocyte adhesion fails (acantholysis).','This produces intraepidermal blisters and erosions.'],.58,1.75,6.3,3.95)
cover_crop(s,os.path.join(BOOK,'1000667260.jpg'),7.38,1.12,5.32,5.85)
add_text(s,'Supplied textbook page',7.38,7.02,3,.22,16,MUTED)
# 4
s=prs.slides.add_slide(blank); bg(s,'Pemphigus: clinical features and classification',4)
card(s,'Typical presentation',['Painful oral erosions may be prominent.','Flaccid blisters rupture readily, leaving erosions and crusts.','Skin may involve face, trunk, and extremities.'],.55,1.15,6.1,4.8)
card(s,'Main clinical types',['Pemphigus vulgaris: skin plus mucosa.','Pemphigus foliaceus: superficial, skin-limited.','Other forms: erythematosus, paraneoplastic, vegetans.'],6.75,1.15,6.0,4.8)
add_text(s,'Clinical image: erosions and flaccid blistering in pemphigus vulgaris (DermNet).',.65,6.35,12,.3,16,MUTED,False,PP_ALIGN.CENTER)
# 5
s=prs.slides.add_slide(blank); bg(s,'Pemphigus: diagnosis and management',5)
card(s,'Diagnosis',['Clinical examination plus biopsy.','Histopathology: intraepidermal blister and acantholysis.','Direct/indirect immunofluorescence and desmoglein antibody tests support diagnosis.'],.55,1.15,6.0,4.9)
card(s,'Management principles',['Suppress pathogenic autoantibodies and control disease activity.','Systemic corticosteroids are commonly used.','Steroid-sparing agents or rituximab may be used; severe disease may need IVIG or plasma exchange.'],6.78,1.15,6.0,4.9)
add_text(s,'Treatment is specialist-directed and individualized to disease severity and comorbidity.',.65,6.35,12,.35,24,TEAL,True,PP_ALIGN.CENTER)
# 6
s=prs.slides.add_slide(blank); bg(s,'Pemphigoid: introduction and pathophysiology',6)
card(s,'Mechanism',['Autoantibodies target BP180 and BP230 at the basement membrane zone.','Complement and inflammatory cells contribute to tissue damage.','Epidermis separates from dermis, forming a subepidermal blister.'],.55,1.2,6.2,4.7)
cover_crop(s,os.path.join(BOOK,'1000667262.jpg'),7.25,1.12,5.5,5.9)
add_text(s,'Supplied textbook page',7.25,7.05,3,.22,16,MUTED)
# 7
s=prs.slides.add_slide(blank); bg(s,'Pemphigoid: clinical features and classification',7)
cover_crop(s,os.path.join(ASSETS,'web_1.jpg'),.55,1.18,4.55,4.9)
card(s,'Clinical pattern',['Large, tense blisters, often with pruritus.','Commonly affects trunk and extremities; mucosal disease varies by subtype.','Bullae may rupture, leaving erosions.'],5.45,1.15,7.35,2.45)
card(s,'Main clinical types',['Bullous pemphigoid: common in older adults.','Mucous membrane pemphigoid: erosions/scarring on mucosa.','Pemphigoid gestationis and linear IgA bullous dermatosis are other entities.'],5.45,3.95,7.35,2.45)
add_text(s,'Clinical image: bullous pemphigoid (DermNet).',.55,6.32,4.55,.22,16,MUTED,False,PP_ALIGN.CENTER)
# 8
s=prs.slides.add_slide(blank); bg(s,'Pemphigoid: diagnosis and management',8)
card(s,'Diagnosis',['Clinical evaluation plus skin biopsy.','Histology shows a subepidermal blister.','Direct immunofluorescence detects IgG and C3 at the basement membrane zone.','Serum antibody tests can support diagnosis.'],.55,1.12,6.1,5.15)
card(s,'Management principles',['Localized disease: potent topical corticosteroids may be effective.','More extensive disease: systemic corticosteroids may be needed.','Adjuncts can include doxycycline/nicotinamide or immunosuppressants; refractory cases may require IVIG or rituximab.'],6.76,1.12,6.02,5.15)
# 9
s=prs.slides.add_slide(blank); bg(s,'Pemphigus vs pemphigoid: summary',9)
headers=['Feature','Pemphigus','Pemphigoid']
rows=[('Target','Desmogleins Dsg1/Dsg3','BP180/BP230 at BMZ'),('Blister level','Intraepidermal','Subepidermal'),('Blister quality','Flaccid, fragile','Tense, more intact'),('Key pathology','Acantholysis','Epidermal-dermal separation'),('Immunofluorescence','Intercellular IgG','Linear IgG/C3 at BMZ')]
xs=[.55,3.05,7.7]; widths=[2.35,4.45,5.05]
for j,h in enumerate(headers):
sh=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,Inches(xs[j]),Inches(1.15),Inches(widths[j]),Inches(.64)); sh.fill.solid(); sh.fill.fore_color.rgb=NAVY; sh.line.fill.background(); add_text(s,h,xs[j]+.1,1.29,widths[j]-.2,.25,24,WHITE,True,PP_ALIGN.CENTER)
for i,row in enumerate(rows):
y=1.8+i*.87
for j,val in enumerate(row):
sh=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,Inches(xs[j]),Inches(y),Inches(widths[j]),Inches(.85)); sh.fill.solid(); sh.fill.fore_color.rgb=PALE if i%2==0 else WHITE; sh.line.color.rgb=RGBColor(200,215,215); add_text(s,val,xs[j]+.12,y+.16,widths[j]-.24,.45,24,INK,j==0,PP_ALIGN.CENTER)
add_text(s,'Biopsy and immunofluorescence distinguish these clinically overlapping autoimmune blistering disorders.',.6,6.45,12.1,.45,24,TEAL,True,PP_ALIGN.CENTER)
# 10
s=prs.slides.add_slide(blank); bg(s,'References and image credits',10)
add_text(s,'Primary source',.7,1.15,3,.35,24,TEAL,True)
add_text(s,'• Supplied textbook pages on pemphigus and pemphigoid (pp. 251-253).',.85,1.65,11.6,.45,24,INK)
add_text(s,'Supporting sources',.7,2.55,3.4,.35,24,TEAL,True)
add_text(s,'• DermNet: Pemphigus vulgaris and bullous pemphigoid clinical images.\n• Morais et al. Systematic review of pemphigus vulgaris and mucous membrane pemphigoid (2024), PMID 38960026.\n• Dridi et al. Systematic review/meta-analysis of oral biopsy sites (2024), PMID 39285275.',.85,3.05,11.6,2.1,24,INK)
add_text(s,'For academic use. Clinical decisions require assessment by a qualified clinician.',.85,6.25,11.6,.35,24,MUTED,False,PP_ALIGN.CENTER)
# enforce typeface and 24-point minimum on text other than headings/captions where deliberately smaller
for slide in prs.slides:
for shape in slide.shapes:
if shape.has_text_frame:
for p in shape.text_frame.paragraphs:
for r in p.runs:
r.font.name='Times New Roman'
prs.save(OUT)
print(OUT)
python "/tmp/workspace/pemphigus-pemphigoid-presentation/src/create_presentation.py" && python -c "from pptx import Presentation; p=Presentation('/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid.pptx'); print('slides',len(p.slides)); print([(i+1, next((sh.text.replace('\\n',' | ')[:70] for sh in s.shapes if sh.has_text_frame and sh.text.strip()),'')) for i,s in enumerate(p.slides)])" && ls -lh "/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid.pptx"
python -c "from pptx import Presentation; from collections import Counter; p=Presentation('/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid.pptx'); fs=[]; pics=0; missing=[]; [([fs.append(round(r.font.size.pt if r.font.size else 0,1)) for para in sh.text_frame.paragraphs for r in para.runs] if sh.has_text_frame else None, setattr(__import__('builtins'),'_x',None)) for sh in s.shapes for _ in [0]]; pics=sum(1 for s in p.slides for sh in s.shapes if sh.shape_type==13); print('slides=',len(p.slides),'pictures=',pics,'font_sizes=',Counter(fs)); print('body_24=',sum(v for k,v in Counter(fs).items() if k==24),'TNR=',all((r.font.name=='Times New Roman') for s in p.slides for sh in s.shapes if sh.has_text_frame for para in sh.text_frame.paragraphs for r in para.runs))"
python -c "from pptx import Presentation; from collections import Counter; p=Presentation('/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid.pptx'); fs=[]; pics=0; tnr=True; [([fs.append(round(r.font.size.pt if r.font.size else 0,1)) for para in sh.text_frame.paragraphs for r in para.runs] if sh.has_text_frame else [], globals().update(pics=pics+(1 if sh.shape_type==13 else 0))) for sl in p.slides for sh in sl.shapes]; tnr=all(r.font.name=='Times New Roman' for sl in p.slides for sh in sl.shapes if sh.has_text_frame for para in sh.text_frame.paragraphs for r in para.runs); print('slides=',len(p.slides),'pictures=',pics,'font_sizes=',dict(Counter(fs)),'all_times_new_roman=',tnr)" && python -c "import os; p='/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid.pptx'; print('exists=',os.path.exists(p),'bytes=',os.path.getsize(p))"
Create a shorter 5-slide version
~/
pemphigus AND pemphigoid
DermNet pemphigus vulgaris bullous pemphigoid clinical features diagnosis
.../src/create_short_presentation.py
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.enum.shapes import MSO_SHAPE
from PIL import Image
import os
ROOT='/tmp/workspace/pemphigus-pemphigoid-presentation'
ASSETS=os.path.join(ROOT,'assets')
BOOK='/tmp/workspace/attachments/c1b14ca3-f2c2-451a-a72d-ee2e568af3f0'
OUT=os.path.join(ROOT,'output','Pemphigus_and_Pemphigoid_5_Slides.pptx')
prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5)
blank=prs.slide_layouts[6]
NAVY=RGBColor(32,53,73); TEAL=RGBColor(25,128,132); PALE=RGBColor(239,247,247); INK=RGBColor(35,43,51); WHITE=RGBColor(255,255,255); GREY=RGBColor(100,110,118)
def rect(sl,x,y,w,h,color, radius=False):
sh=sl.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.fill.background(); return sh
def text(sl,txt,x,y,w,h,size=24,color=INK,bold=False,align=PP_ALIGN.LEFT):
tb=sl.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); tf=tb.text_frame; tf.clear(); tf.word_wrap=True; tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0.05; tf.vertical_anchor=MSO_ANCHOR.MIDDLE
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(7)
for r in p.runs: r.font.name='Times New Roman'; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color
return tb
def add_img(sl,path,x,y,w,h):
iw,ih=Image.open(path).size; scale=max(w/iw,h/ih); nw,nh=iw*scale,ih*scale; left=x-(nw-w)/2; top=y-(nh-h)/2
sl.shapes.add_picture(path, Inches(left), Inches(top), width=Inches(nw), height=Inches(nh))
def header(sl,title,num):
rect(sl,0,0,13.333,0.72,NAVY); text(sl,title,0.55,0.12,10.9,0.38,30,WHITE,True); text(sl,f'{num}/5',12.1,0.17,0.65,0.3,16,WHITE,False,PP_ALIGN.RIGHT)
def bullets(sl, items, x=0.65,y=1.25,w=7.0):
for i,item in enumerate(items): text(sl,'• '+item,x,y+i*1.10,w,0.9,24,INK,False)
def caption(sl,cap,x,y,w): text(sl,cap,x,y,w,0.34,13,GREY,False,PP_ALIGN.CENTER)
# 1
s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,PALE); rect(s,0,0,13.333,1.0,NAVY)
text(s,'Pemphigus and Pemphigoid',0.55,1.2,7.1,0.75,38,NAVY,True)
text(s,'Autoimmune blistering diseases',0.58,2.05,6.7,0.45,24,TEAL,True)
text(s,'A concise overview of presentation, diagnosis, and management',0.58,2.75,6.6,0.9,24,INK)
rect(s,0.58,4.0,5.8,0.72,TEAL,True); text(s,'Times New Roman | Body text: 24 pt',0.82,4.14,5.25,0.28,18,WHITE,True,PP_ALIGN.CENTER)
add_img(s,os.path.join(ASSETS,'web_0.jpg'),7.75,1.05,4.75,5.4); caption(s,'Clinical image: pemphigus vulgaris (DermNet)',7.75,6.55,4.75)
#2
s=prs.slides.add_slide(blank); header(s,'Pemphigus',2); bullets(s,['Autoimmune intraepidermal blistering disorder.', 'IgG autoantibodies target desmoglein 1 and/or desmoglein 3.', 'Loss of keratinocyte adhesion causes acantholysis and flaccid bullae.', 'Painful oral erosions are common; skin lesions may follow.'],0.65,1.18,7.2); add_img(s,os.path.join(BOOK,'1000667260.jpg'),8.35,1.25,4.25,4.95); caption(s,'Supplied source page: pemphigus',8.35,6.30,4.25)
#3
s=prs.slides.add_slide(blank); header(s,'Pemphigoid',3); bullets(s,['Autoimmune subepidermal blistering disorder.', 'Autoantibodies commonly target BP180 and BP230 at the basement membrane zone.', 'Complement and inflammatory cells produce a subepidermal split.', 'Large, tense, itchy bullae are typical; bullous pemphigoid mainly affects older adults.'],0.65,1.1,7.2); add_img(s,os.path.join(ASSETS,'web_1.jpg'),8.35,1.35,4.25,4.8); caption(s,'Clinical image: bullous pemphigoid (DermNet)',8.35,6.30,4.25)
#4
s=prs.slides.add_slide(blank); header(s,'Diagnosis and management',4); text(s,'Diagnosis',0.7,1.05,5.4,0.45,28,TEAL,True); bullets(s,['Clinical examination plus biopsy.', 'Histopathology identifies the level of split.', 'Direct immunofluorescence and antibody tests support confirmation.'],0.7,1.65,5.8); text(s,'Management',6.8,1.05,5.4,0.45,28,TEAL,True); bullets(s,['Disease severity and site determine treatment.', 'Corticosteroids are used with steroid-sparing immunomodulators where needed.', 'Supportive wound care and infection monitoring are important.'],6.8,1.65,5.8)
#5
s=prs.slides.add_slide(blank); header(s,'Key comparison',5); rect(s,0.65,1.08,12.05,0.68,TEAL,True); text(s,'Feature Pemphigus Pemphigoid',0.95,1.23,11.4,0.28,22,WHITE,True)
rows=[('Level of split','Intraepidermal','Subepidermal'),('Blister','Flaccid, easily ruptured','Tense, more intact'),('Main target','Desmogleins','BP180/BP230 and basement membrane zone'),('Typical clue','Painful oral erosions','Pruritus and large bullae')]
for i,(a,b,c) in enumerate(rows):
y=1.96+i*1.05; rect(s,0.65,y,12.05,0.85,RGBColor(247,250,250) if i%2==0 else PALE,True); text(s,a,0.92,y+0.18,2.4,0.35,22,NAVY,True); text(s,b,3.35,y+0.18,4.0,0.35,22,INK); text(s,c,7.65,y+0.18,4.55,0.35,22,INK)
text(s,'Source: user-supplied textbook pages. Clinical images: DermNet. Educational summary only.',0.72,6.76,11.9,0.28,14,GREY,False,PP_ALIGN.CENTER)
prs.save(OUT); print(OUT)
python "/tmp/workspace/pemphigus-pemphigoid-presentation/src/create_short_presentation.py" && python -c "from pptx import Presentation; import os; p='/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid_5_Slides.pptx'; r=Presentation(p); print('slides=',len(r.slides)); print('images=',sum(1 for s in r.slides for sh in s.shapes if sh.shape_type==13)); print('exists=',os.path.exists(p),'bytes=',os.path.getsize(p)); print([next((sh.text.split('\\n')[0] for sh in s.shapes if sh.has_text_frame and sh.text.strip()), '') for s in r.slides])" && ls -lh "/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid_5_Slides.pptx"
.../src/create_short_presentation.py
Successfully replaced 1 instance(s) of the string in '/tmp/workspace/pemphigus-pemphigoid-presentation/src/create_short_presentation.py'
python "/tmp/workspace/pemphigus-pemphigoid-presentation/src/create_short_presentation.py" && python -c "from pptx import Presentation; import os; p='/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid_5_Slides.pptx'; r=Presentation(p); print('slides=',len(r.slides)); print('images=',sum(1 for s in r.slides for sh in s.shapes if sh.shape_type==13)); print('exists=',os.path.exists(p),'bytes=',os.path.getsize(p)); print([next((sh.text.split('\\n')[0] for sh in s.shapes if sh.has_text_frame and sh.text.strip()), '') for s in r.slides])" && ls -lh "/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_and_Pemphigoid_5_Slides.pptx"
Pemphigus and Pemphigoid 5 Slides
Presentation · PPTX
Give me introduction slide form
pemphigus AND pemphigoid
DermNet pemphigus vulgaris bullous pemphigoid overview
Ppt form.
~/
python -c "from pptx import Presentation; from pptx.util import Inches,Pt; from pptx.dml.color import RGBColor; from pptx.enum.text import PP_ALIGN,MSO_ANCHOR; from pptx.enum.shapes import MSO_SHAPE; import os; out='/tmp/workspace/pemphigus-pemphigoid-presentation/output/Introduction_Pemphigus_and_Pemphigoid.pptx'; p=Presentation(); p.slide_width=Inches(13.333); p.slide_height=Inches(7.5); s=p.slides.add_slide(p.slide_layouts[6]); bg=s.background.fill; bg.solid(); bg.fore_color.rgb=RGBColor(246,250,250); band=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,0,Inches(13.333),Inches(0.35)); band.fill.solid(); band.fill.fore_color.rgb=RGBColor(35,57,77); band.line.fill.background(); t=s.shapes.add_textbox(Inches(.6),Inches(.62),Inches(12),Inches(.65)); tf=t.text_frame; tf.clear(); pp=tf.paragraphs[0]; pp.text='Introduction: Pemphigus and Pemphigoid'; r=pp.runs[0]; r.font.name='Times New Roman'; r.font.size=Pt(30); r.font.bold=True; r.font.color.rgb=RGBColor(35,57,77); box=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(.6),Inches(1.55),Inches(8.25),Inches(5.15)); box.fill.solid(); box.fill.fore_color.rgb=RGBColor(230,241,241); box.line.color.rgb=RGBColor(41,132,139); tb=s.shapes.add_textbox(Inches(.95),Inches(1.9),Inches(7.55),Inches(4.5)); f=tb.text_frame; f.clear(); f.word_wrap=True; f.margin_left=f.margin_right=Inches(.05); f.margin_top=Inches(.04); f.margin_bottom=Inches(.04); f.vertical_anchor=MSO_ANCHOR.MIDDLE; bullets=['Pemphigus and pemphigoid are autoimmune blistering disorders affecting skin and mucous membranes.','Autoantibodies disrupt normal adhesion structures within the skin.','Pemphigus causes fragile, flaccid blisters and painful erosions, often involving the mouth.','Pemphigoid usually produces large, tense blisters and is frequently itchy.','Early diagnosis is important to prevent extensive skin and mucosal damage.']; for i,b in enumerate(bullets): q=f.paragraphs[0] if i==0 else f.add_paragraph(); q.text=b; q.level=0; q.space_after=Pt(10); q.font.name='Times New Roman'; q.font.size=Pt(24); q.font.color.rgb=RGBColor(35,43,51); q._p.get_or_add_pPr().insert(0,__import__('pptx').oxml.parse_xml('<a:buChar xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" char=\"•\"/>')); img='/tmp/workspace/pemphigus-pemphigoid-presentation/assets/web_0.jpg'; s.shapes.add_picture(img,Inches(9.2),Inches(1.55),width=Inches(3.45),height=Inches(3.0)); cap=s.shapes.add_textbox(Inches(9.2),Inches(4.7),Inches(3.45),Inches(.85)); cf=cap.text_frame; cf.clear(); cp=cf.paragraphs[0]; cp.text='Pemphigus vulgaris\nClinical image'; cp.alignment=PP_ALIGN.CENTER; cr=cp.runs[0]; cr.font.name='Times New Roman'; cr.font.size=Pt(18); cr.font.italic=True; cr.font.color.rgb=RGBColor(90,103,112); foot=s.shapes.add_textbox(Inches(.6),Inches(7.05),Inches(12),Inches(.25)); ff=foot.text_frame; ff.clear(); fp=ff.paragraphs[0]; fp.text='Based on the supplied textbook material'; fr=fp.runs[0]; fr.font.name='Times New Roman'; fr.font.size=Pt(12); fr.font.color.rgb=RGBColor(90,103,112); p.save(out); print(out)" && python -c "from pptx import Presentation; import os; x='/tmp/workspace/pemphigus-pemphigoid-presentation/output/Introduction_Pemphigus_and_Pemphigoid.pptx'; p=Presentation(x); print(len(p.slides),os.path.getsize(x))"
Introduction Pemphigus and Pemphigoid
Presentation · PPTX
Pemiphigus Pathophisiology slide ppt
pemphigus AND pathogenesis
pemphigus pathophysiology desmoglein acantholysis review
python -c "from pptx import Presentation; from pptx.util import Inches,Pt; from pptx.dml.color import RGBColor; from pptx.enum.text import PP_ALIGN,MSO_ANCHOR; from pptx.enum.shapes import MSO_SHAPE,MSO_CONNECTOR; import os; out='/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_Pathophysiology.pptx'; p=Presentation(); p.slide_width=Inches(13.333); p.slide_height=Inches(7.5); s=p.slides.add_slide(p.slide_layouts[6]); bg=s.background.fill; bg.solid(); bg.fore_color.rgb=RGBColor(247,250,250); navy=RGBColor(35,57,77); teal=RGBColor(41,132,139); pale=RGBColor(230,241,241); ink=RGBColor(35,43,51); red=RGBColor(165,65,65); band=s.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,0,Inches(13.333),Inches(.35)); band.fill.solid(); band.fill.fore_color.rgb=navy; band.line.fill.background(); def addtext(x,y,w,h,tx,sz,color=ink,bold=False,align=PP_ALIGN.CENTER): tb=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); f=tb.text_frame; f.clear(); f.word_wrap=True; f.margin_left=f.margin_right=Inches(.06); f.margin_top=f.margin_bottom=Inches(.03); f.vertical_anchor=MSO_ANCHOR.MIDDLE; q=f.paragraphs[0]; q.text=tx; q.alignment=align; r=q.runs[0]; r.font.name='Times New Roman'; r.font.size=Pt(sz); r.font.bold=bold; r.font.color.rgb=color; return tb def box(x,y,w,h,tx,fill,bold=False,sz=24): sh=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(x),Inches(y),Inches(w),Inches(h)); sh.fill.solid(); sh.fill.fore_color.rgb=fill; sh.line.color.rgb=teal; addtext(x+.08,y+.05,w-.16,h-.1,tx,sz,ink,bold); return sh addtext(.55,.55,12,.62,'Pemphigus: Pathophysiology',30,navy,True,PP_ALIGN.LEFT); addtext(.65,1.22,12,.45,'Autoantibodies disrupt desmosomal adhesion between keratinocytes, producing intraepidermal blisters.',24,ink,False,PP_ALIGN.LEFT) # pathway boxes box(.65,2.1,2.2,1.2,'Genetic and environmental predisposition',pale,True,22); box(3.25,2.1,2.15,1.2,'IgG autoantibodies form',pale,True,22); box(5.8,2.1,2.15,1.2,'Targets desmoglein 1 and/or 3',pale,True,22); box(8.35,2.1,2.15,1.2,'Loss of keratinocyte adhesion',pale,True,22); box(10.9,2.1,1.78,1.2,'Acantholysis',RGBColor(250,232,232),True,22) for x in [2.87,5.42,7.97,10.52]: ln=s.shapes.add_connector(MSO_CONNECTOR.STRAIGHT,Inches(x),Inches(2.7),Inches(x+.35),Inches(2.7)); ln.line.color.rgb=teal; ln.line.width=Pt(2.2) box(4.0,4.12,5.35,1.15,'Intraepidermal clefting\n↓\nFlaccid blisters and painful erosions',RGBColor(250,232,232),True,24) ln=s.shapes.add_connector(MSO_CONNECTOR.STRAIGHT,Inches(11.8),Inches(3.32),Inches(8.9),Inches(4.1)); ln.line.color.rgb=red; ln.line.width=Pt(2.5) # side notes note=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(.75),Inches(5.65),Inches(11.8),Inches(1.0)); note.fill.solid(); note.fill.fore_color.rgb=RGBColor(235,244,246); note.line.color.rgb=teal; addtext(1.05,5.75,11.2,.78,'Key point: Dsg3 antibodies predominate in mucosal disease; combined Dsg1 and Dsg3 autoantibodies are associated with mucocutaneous disease.',24,ink,False,PP_ALIGN.LEFT) addtext(.65,7.05,12,.23,'Source: supplied textbook material. Core mechanism: anti-desmoglein antibodies and acantholysis.',12,RGBColor(90,103,112),False,PP_ALIGN.LEFT); p.save(out); print(out)" && python -c "from pptx import Presentation; import os; f='/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_Pathophysiology.pptx'; p=Presentation(f); print('slides',len(p.slides),'size',os.path.getsize(f),'pictures',sum(1 for s in p.slides for sh in s.shapes if sh.shape_type==13))"
Pemiphigus Pathophisiology slide ppt
From picture can u give me Pemiphigus Pathophisiology slide ppt
pemphigus AND pathogenesis
pemphigus pathogenesis desmoglein acantholysis review
python -c "from pptx import Presentation; from pptx.util import Inches,Pt; from pptx.dml.color import RGBColor; from pptx.enum.text import PP_ALIGN,MSO_ANCHOR; from pptx.enum.shapes import MSO_SHAPE,MSO_CONNECTOR; from PIL import Image; import os; root='/tmp/workspace/pemphigus-pemphigoid-presentation'; out=root+'/output/Pemphigus_Pathophysiology_From_Textbook_Picture.pptx'; src='/tmp/workspace/attachments/c1b14ca3-f2c2-451a-a72d-ee2e568af3f0/1000667260.jpg'; crop=root+'/assets/pemphigus_pathophysiology_source_crop.jpg'; im=Image.open(src); im.crop((65,640,1540,1150)).save(crop); p=Presentation(); p.slide_width=Inches(13.333); p.slide_height=Inches(7.5); s=p.slides.add_slide(p.slide_layouts[6]); bg=s.background.fill; bg.solid(); bg.fore_color.rgb=RGBColor(248,250,250); navy=RGBColor(44,55,79); purple=RGBColor(111,75,125); pale=RGBColor(242,237,246); ink=RGBColor(39,43,50); muted=RGBColor(91,98,109); s.shapes.add_shape(MSO_SHAPE.RECTANGLE,0,0,Inches(13.333),Inches(.32)).fill.solid(); sh=s.shapes[-1]; sh.fill.fore_color.rgb=purple; sh.line.fill.background(); def txt(x,y,w,h,t,size=24,bold=False,col=ink,align=PP_ALIGN.LEFT): tb=s.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h)); f=tb.text_frame; f.clear(); f.word_wrap=True; f.margin_left=f.margin_right=Inches(.05); f.margin_top=f.margin_bottom=Inches(.03); f.vertical_anchor=MSO_ANCHOR.MIDDLE; q=f.paragraphs[0]; q.text=t; q.alignment=align; r=q.runs[0]; r.font.name='Times New Roman'; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=col; return tb def box(x,y,w,h,t,fill): z=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(x),Inches(y),Inches(w),Inches(h)); z.fill.solid(); z.fill.fore_color.rgb=fill; z.line.color.rgb=purple; txt(x+.12,y+.08,w-.24,h-.16,t,24,True,ink,PP_ALIGN.CENTER) txt(.55,.55,12.1,.6,'Pemphigus: Pathophysiology',30,True,navy); txt(.62,1.2,8.2,.55,'Based on the supplied textbook photograph',18,False,muted) box(.6,1.9,3.45,1.35,'Autoantibodies against\nDsg1 and Dsg3',pale); box(4.95,1.9,3.45,1.35,'Complement activation and\nT-cell-mediated immunity',pale); box(.6,4.1,3.45,1.35,'Inflammation, cytokine release\nand apoptosis',pale); box(4.95,4.1,3.45,1.35,'Disrupted keratinocyte adhesion\n→ acantholysis',pale) for a,b,c,d in [(4.08,2.58,4.93,2.58),(6.68,3.28,6.68,4.05),(4.93,4.78,4.08,4.78)]: line=s.shapes.add_connector(MSO_CONNECTOR.STRAIGHT,Inches(a),Inches(b),Inches(c),Inches(d)); line.line.color.rgb=purple; line.line.width=Pt(2.25) res=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(1.7),Inches(5.95),Inches(5.6),Inches(.72)); res.fill.solid(); res.fill.fore_color.rgb=RGBColor(252,231,232); res.line.color.rgb=RGBColor(166,72,80); txt(1.85,6.04,5.3,.48,'Intraepidermal blister formation',24,True,RGBColor(130,47,55),PP_ALIGN.CENTER) line=s.shapes.add_connector(MSO_CONNECTOR.STRAIGHT,Inches(6.68),Inches(5.47),Inches(5.45),Inches(5.92)); line.line.color.rgb=RGBColor(166,72,80); line.line.width=Pt(2.25) # Photograph panel panel=s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE,Inches(8.85),Inches(1.2),Inches(3.9),Inches(5.75)); panel.fill.solid(); panel.fill.fore_color.rgb=RGBColor(255,255,255); panel.line.color.rgb=purple; s.shapes.add_picture(crop,Inches(9.08),Inches(1.48),width=Inches(3.44),height=Inches(3.2)); txt(9.05,4.83,3.5,.9,'Textbook source:\nPemphigus pathophysiology',18,True,navy,PP_ALIGN.CENTER); txt(9.05,5.78,3.5,.8,'Additional factors mentioned:\nGenetic predisposition, infections and UV radiation',16,False,muted,PP_ALIGN.CENTER); txt(.62,7.08,12,.2,'Text: Times New Roman, 24 pt. Dsg = desmoglein.',12,False,muted); p.save(out); print(out)" && python -c "from pptx import Presentation; import os; f='/tmp/workspace/pemphigus-pemphigoid-presentation/output/Pemphigus_Pathophysiology_From_Textbook_Picture.pptx'; q=Presentation(f); print('slides=',len(q.slides),'pictures=',sum(1 for s in q.slides for x in s.shapes if x.shape_type==13),'bytes=',os.path.getsize(f))"
Pemphigus Pathophysiology From Textbook Picture
Presentation · PPTX