give ppt for journal presentation in simple

Reading File
Reading File
Reading File
Browsing Directory

~/

Reading File
Searching PubMed

clinical topic journal article

Searching the Web

"68_2025_Article_2871"

Running Command

python -c "from pypdf import PdfReader; p='/tmp/workspace/attachments/96277e4d-104c-4558-a27c-5dd44cc1a5b2/68_2025_Article_2871.pdf'; r=PdfReader(p); print('PAGES',len(r.pages)); print('METADATA',r.metadata); [print('\n---PAGE',i+1,'---\n'+(page.extract_text() or '')[:5000]) for i,page in enumerate(r.pages)]"

Browsing Directory

~/

Running Command

mkdir -p "/tmp/workspace/helical-plating-journal-presentation/src" "/tmp/workspace/helical-plating-journal-presentation/output" "/tmp/workspace/helical-plating-journal-presentation/assets" && python -c "import fitz; doc=fitz.open('/tmp/workspace/attachments/96277e4d-104c-4558-a27c-5dd44cc1a5b2/68_2025_Article_2871.pdf'); [doc[p].get_pixmap(matrix=fitz.Matrix(1.8,1.8),alpha=False).save(f'/tmp/workspace/helical-plating-journal-presentation/assets/page_{p+1}.png') for p in [2,6,7]]; print('rendered')"

Running Command

python -c "import importlib.util; print('pdf2image',importlib.util.find_spec('pdf2image')); print('pymupdf',importlib.util.find_spec('pymupdf')); print('wand',importlib.util.find_spec('wand'))"

Running Command

python - <<'PY' 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_LINE_DASH_STYLE from pptx.enum.text import MSO_AUTO_SIZE from pathlib import Path out=Path('/tmp/workspace/helical-plating-journal-presentation/output/Helical_Plating_Journal_Presentation.pptx') prs=Presentation(); prs.slide_width=Inches(13.333); prs.slide_height=Inches(7.5) blank=prs.slide_layouts[6] NAVY=RGBColor(18,49,75); TEAL=RGBColor(0,129,139); SKY=RGBColor(222,242,245); ORANGE=RGBColor(232,124,53); INK=RGBColor(36,48,58); GREY=RGBColor(105,117,127); PALE=RGBColor(246,249,250); WHITE=RGBColor(255,255,255); RED=RGBColor(187,64,57) def rect(slide,x,y,w,h,fill, line=None, radius=False): s=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if radius else MSO_SHAPE.RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h)) s.fill.solid(); s.fill.fore_color.rgb=fill s.line.color.rgb=line if line else fill if radius: s.adjustments[0]=0.08 return s def txt(slide,text,x,y,w,h,size=20,color=INK,bold=False,align=PP_ALIGN.LEFT, font='Aptos',val=MSO_ANCHOR.TOP): 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=Inches(.03); tf.margin_top=tf.margin_bottom=Inches(.02); tf.vertical_anchor=val p=tf.paragraphs[0]; p.alignment=align; p.space_after=Pt(0) r=p.add_run(); r.text=text; r.font.name=font; r.font.size=Pt(size); r.font.bold=bold; r.font.color.rgb=color return box def title(slide,kicker,heading,sub=''): txt(slide,kicker.upper(),.55,.28,12,.28,10,TEAL,True) txt(slide,heading,.55,.6,12.2,.55,28,NAVY,True) if sub: txt(slide,sub,.56,1.16,12,.32,12,GREY) rect(slide,.55,1.55,12.23,.025,TEAL) def footer(slide,n): rect(slide,0,7.18,13.333,.32,NAVY) txt(slide,'Kraus et al. Eur J Trauma Emerg Surg. 2025;51:203. doi:10.1007/s00068-025-02871-1',.55,7.23,10.9,.16,8,WHITE) txt(slide,str(n),12.25,7.22,.5,.16,9,WHITE,True,PP_ALIGN.RIGHT) def bullet(slide,items,x,y,w,h,size=18): 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=Inches(.12); tf.margin_right=Inches(.04) 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.name='Aptos'; p.font.size=Pt(size); p.font.color.rgb=INK; p.space_after=Pt(11); p.bullet=True return box def stat(slide,num,label,x,y,w=2.45,accent=TEAL): rect(slide,x,y,w,1.32,PALE,PALE,True); rect(slide,x,y,.09,1.32,accent,accent) txt(slide,num,x+.25,y+.20,w-.35,.45,28,NAVY,True) txt(slide,label,x+.25,y+.77,w-.35,.35,12,GREY) def bone(slide,x,y,w,h,mode='straight'): # schematic long bone and plate only rect(slide,x,y,w,h,RGBColor(235,226,209),RGBColor(218,205,184),True) # plate segments if mode=='straight': p=rect(slide,x+w*.44,y+.12,w*.13,h-.24,NAVY,NAVY,True) elif mode=='45': # adjacent segments demonstrating wrap rect(slide,x+w*.42,y+.12,w*.12,h*.42,NAVY,NAVY,True); rect(slide,x+w*.48,y+h*.40,w*.30,h*.12,NAVY,NAVY,True); rect(slide,x+w*.70,y+h*.46,w*.12,h*.40,NAVY,NAVY,True) elif mode=='90': rect(slide,x+w*.42,y+.12,w*.12,h*.30,NAVY,NAVY,True); rect(slide,x+w*.52,y+h*.29,w*.34,h*.12,NAVY,NAVY,True); rect(slide,x+w*.74,y+h*.35,w*.12,h*.50,NAVY,NAVY,True) # 1 s=prs.slides.add_slide(blank); rect(s,0,0,13.333,7.5,NAVY); rect(s,.65,.65,.14,5.75,TEAL) txt(s,'JOURNAL PRESENTATION',1.05,.82,5,.32,13,RGBColor(118,218,220),True) txt(s,'Evolving fracture management:\nthe role of helical plating',1.05,1.28,8.6,1.55,30,WHITE,True) txt(s,'A narrative review of anatomy, biomechanics, and clinical evidence',1.08,3.06,7.6,.45,17,RGBColor(220,231,235)) rect(s,1.05,4.05,7.2,.72,TEAL,TEAL,True); txt(s,'Kraus et al. | European Journal of Trauma and Emergency Surgery | 2025',1.28,4.26,6.75,.22,12,WHITE,True) txt(s,'Presented by: ____________________\nDepartment: ____________________\nDate: ____________________',1.08,5.15,5.1,.85,15,WHITE) # schematic bone(s,10.2,1.05,1.35,4.9,'45'); txt(s,'HELICAL\nPLATE',10.02,6.14,1.8,.4,14,RGBColor(118,218,220),True,PP_ALIGN.CENTER) footer(s,1) #2 s=prs.slides.add_slide(blank); title(s,'Paper at a glance','Why this review matters') stat(s,'23','studies included',.7,1.95); stat(s,'0','randomized trials',3.4,1.95,2.45,ORANGE); stat(s,'1992-2023','study period',6.1,1.95,2.45); stat(s,'Femur + humerus','main sites studied',8.8,1.95,3.3) bullet(s,['Straight plates can lie close to important nerves and blood vessels.','Helical plates wrap around bone, potentially changing fixation strength and surgical safety.','The authors summarize existing evidence and suggest where each design may fit.'],.82,3.72,11.5,2.4,19) footer(s,2) #3 s=prs.slides.add_slide(blank); title(s,'Background','What is a helical plate?') bone(s,.95,2.05,1.15,3.5,'straight'); bone(s,4.15,2.05,1.15,3.5,'45'); bone(s,7.35,2.05,1.15,3.5,'90') txt(s,'Straight plate',.45,5.75,2.15,.35,16,NAVY,True,PP_ALIGN.CENTER); txt(s,'45° helical plate',3.55,5.75,2.3,.35,16,NAVY,True,PP_ALIGN.CENTER); txt(s,'90° helical plate',6.72,5.75,2.4,.35,16,NAVY,True,PP_ALIGN.CENTER) rect(s,9.7,2.1,2.65,3.6,SKY,SKY,True); txt(s,'Simple idea',10,2.42,2.0,.35,18,NAVY,True); bullet(s,['Plate changes surface as it follows the bone.','May avoid vulnerable anatomy.','Angle and site matter.'],9.92,3.02,2.2,2.2,15) footer(s,3) #4 s=prs.slides.add_slide(blank); title(s,'Methods','How was the evidence collected?') # Flow steps=[('Search','PubMed + Web of Science'),('Screen','32 records found'),('Include','23 full-text studies'),('Group','5 study categories')] for i,(a,b) in enumerate(steps): x=.75+i*3.05; rect(s,x,2.25,2.45,1.42,PALE,PALE,True); txt(s,str(i+1),x+.18,2.48,.35,.35,20,TEAL,True); txt(s,a,x+.62,2.45,1.62,.28,18,NAVY,True); txt(s,b,x+.23,3.02,1.95,.37,12,GREY,False,PP_ALIGN.CENTER) if i<3: txt(s,'›',x+2.52,2.66,.35,.4,31,ORANGE,True,PP_ALIGN.CENTER) rect(s,.85,4.65,11.65,1.25,SKY,SKY,True); txt(s,'Categories: finite element simulation | biomechanical study | case series | comparative study | anatomical study',1.12,4.92,11.05,.38,17,NAVY,True,PP_ALIGN.CENTER); txt(s,'Single case reports were excluded. Search completed 31 January 2024.',1.45,5.42,10.4,.24,12,GREY,False,PP_ALIGN.CENTER) footer(s,4) #5 s=prs.slides.add_slide(blank); title(s,'Results','Evidence base: breadth but low certainty') # bar chart labels cats=[('Biomechanical',7),('Case series',6),('Anatomical',5),('Comparative',4),('FEA simulation',3)] for i,(lab,val) in enumerate(cats): y=1.95+i*.78; txt(s,lab,.9,y,2.15,.25,16,INK); rect(s,3.15,y+.02,val*.78,.30,TEAL,TEAL,True); txt(s,str(val),3.23+val*.78,y, .35,.25,15,NAVY,True) rect(s,8.35,2.0,3.85,3.55,PALE,PALE,True); txt(s,'Key limitation',8.7,2.35,2.9,.35,20,ORANGE,True); txt(s,'No randomized\ncontrolled trials',8.72,3.05,2.95,.75,25,NAVY,True,PP_ALIGN.CENTER); txt(s,'Most evidence is laboratory, anatomical, or small observational studies.',8.75,4.25,2.95,.62,14,GREY,False,PP_ALIGN.CENTER) footer(s,5) #6 s=prs.slides.add_slide(blank); title(s,'Humerus','Potential advantage: safer route around the radial nerve') bone(s,1.05,1.85,1.45,4.55,'straight'); bone(s,5.05,1.85,1.45,4.55,'45') # nerve dashed approximations for x,label,col in [(2.58,'Radial nerve\nclose to straight plate',RED),(6.58,'Plate path moves\naway from nerve',TEAL)]: sh=s.shapes.add_shape(MSO_SHAPE.ARC, Inches(x), Inches(2.55), Inches(1.55), Inches(2.5)); sh.line.color.rgb=col; sh.line.width=Pt(2.4); sh.line.dash_style=MSO_LINE_DASH_STYLE.DASH txt(s,label,x-.05,5.5,1.7,.55,13,col,True,PP_ALIGN.CENTER) txt(s,'STRAIGHT',.83,6.45,1.8,.25,14,NAVY,True,PP_ALIGN.CENTER); txt(s,'45° HELICAL',4.78,6.45,2,.25,14,NAVY,True,PP_ALIGN.CENTER) rect(s,8.75,2.0,3.55,3.85,SKY,SKY,True); txt(s,'What the review suggests',9.03,2.34,3.05,.35,18,NAVY,True); bullet(s,['45° helical plates are the preferred design for humeral MIPO.','All helical designs improve clearance from the radial nerve.','90° plates may be less favorable under cyclic torsion.'],9.0,2.98,3.0,2.4,14) footer(s,6) #7 s=prs.slides.add_slide(blank); title(s,'Distal femur','Stability and anatomy must be balanced') bone(s,1.1,1.9,1.25,4.4,'45'); txt(s,'180° single\nhelical construct',.65,6.35,2.2,.5,14,NAVY,True,PP_ALIGN.CENTER) bone(s,4.45,1.9,1.25,4.4,'90'); rect(s,4.73,2.05,.16,4.05,NAVY,NAVY,True); txt(s,'90° medial helical +\nlateral straight plate',3.65,6.35,2.9,.5,14,NAVY,True,PP_ALIGN.CENTER) rect(s,7.55,1.95,4.7,4.45,PALE,PALE,True); txt(s,'Main findings',7.92,2.28,3.9,.35,20,NAVY,True); bullet(s,['180° helical plating: better initial axial stability and endurance to failure in a young-bone model.','90° medial helical double plating: biomechanical advantage in geriatric distal femur constructs.','Proximity to femoral vessels still requires careful insertion and screw placement.'],7.88,2.88,3.85,3.0,14) footer(s,7) #8 s=prs.slides.add_slide(blank); title(s,'Clinical evidence','What are the patient outcomes?') # table-like for y,hd,body in [(1.9,'Union','Small humeral case series generally reported healing; one 24-case twisted-plate series reported 100% union.'),(3.15,'Function','Reported functional outcomes were satisfactory, but measures and follow-up varied.'),(4.4,'Complications','Comparative data suggest lower overall complications with MIPO helical plating vs lateral straight plating; evidence remains observational.')]: rect(s,.82,y,2.2,.88,TEAL,TEAL,True); txt(s,hd,1.08,y+.27,1.7,.28,17,WHITE,True,PP_ALIGN.CENTER) rect(s,3.1,y,8.95,.88,PALE,PALE,True); txt(s,body,3.35,y+.18,8.4,.52,15,INK) rect(s,.85,5.85,11.15,.55,RGBColor(255,242,227),RGBColor(255,242,227),True); txt(s,'Interpret carefully: no evidence here proves superiority in patient-important outcomes.',1.05,6.02,10.75,.22,15,ORANGE,True,PP_ALIGN.CENTER) footer(s,8) #9 s=prs.slides.add_slide(blank); title(s,'Critical appraisal','Strengths and limitations') for x,head,items,col in [(.8,'Strengths',['Focused question with practical relevance','Search used two major databases','Combines anatomy, mechanics, and clinical data'],TEAL),(6.82,'Limitations',['Narrative review, not a formal systematic review','Heterogeneous designs and outcomes','No RCTs; many small or laboratory studies','Recommendations are partly inference-based'],ORANGE)]: rect(s,x,1.95,5.55,4.45,PALE,PALE,True); rect(s,x,1.95,5.55,.55,col,col,True); txt(s,head,x+.3,2.1,4.8,.25,18,WHITE,True); bullet(s,items,x+.38,2.82,4.75,2.9,17) footer(s,9) #10 s=prs.slides.add_slide(blank); title(s,'Take-home message','Where does helical plating fit?') for i,(h,b,col) in enumerate([('Humerus','45° helical design is a reasonable MIPO option when radial-nerve clearance is important.',TEAL),('Young distal femur','180° helical plate may offer favorable mechanical behavior.',ORANGE),('Geriatric distal femur','90° medial helical plate in a double-plate construct may improve stability.',TEAL)]): y=1.85+i*1.4; rect(s,.85,y,11.65,1.02,PALE,PALE,True); rect(s,.85,y,.16,1.02,col,col); txt(s,h,1.28,y+.18,2.4,.28,18,NAVY,True); txt(s,b,3.62,y+.17,8.25,.5,16,INK) rect(s,.85,6.18,11.65,.45,NAVY,NAVY,True); txt(s,'Need: well-designed comparative clinical trials with standardized outcomes.',1.05,6.30,11.2,.18,14,WHITE,True,PP_ALIGN.CENTER) footer(s,10) #11 s=prs.slides.add_slide(blank); title(s,'Discussion','Questions for the journal club') bullet(s,['Which fracture patterns in your practice could truly benefit from a helical design?','Does improved clearance from the radial nerve justify a more complex contouring technique?','Should the current biomechanical advantages change practice before higher-quality clinical evidence is available?','How can pre-contoured or patient-specific implants reduce variability in intraoperative bending?'],.95,1.9,11.3,3.8,20) rect(s,.95,5.95,11.4,.55,SKY,SKY,True); txt(s,'Thank you',1.15,6.09,11,.22,18,NAVY,True,PP_ALIGN.CENTER); footer(s,11) #12 s=prs.slides.add_slide(blank); title(s,'Reference','Primary article') rect(s,.85,1.95,11.65,2.65,PALE,PALE,True) ref='Kraus M, Gueorguiev B, Pastor T, et al. Evolving fracture management: the role of helical plating in orthopaedic trauma surgery - a narrative review. European Journal of Trauma and Emergency Surgery. 2025;51:203. https://doi.org/10.1007/s00068-025-02871-1' txt(s,ref,1.22,2.42,10.9,1.45,20,NAVY,False) txt(s,'Key message: helical plates are promising alternatives in selected long-bone fractures, but clinical certainty remains limited.',1.05,5.35,11.25,.55,19,TEAL,True,PP_ALIGN.CENTER) footer(s,12) prs.save(out) print(out) PY python - <<'PY' from pptx import Presentation p='/tmp/workspace/helical-plating-journal-presentation/output/Helical_Plating_Journal_Presentation.pptx' r=Presentation(p) print('slides',len(r.slides)) for i,s in enumerate(r.slides,1): print(i, sum(1 for sh in s.shapes if getattr(sh,'has_text_frame',False) and sh.text.strip())) PY

Running Command

python - <<'PY' from pathlib import Path from zipfile import ZipFile from pptx import Presentation p=Path('/tmp/workspace/helical-plating-journal-presentation/output/Helical_Plating_Journal_Presentation.pptx') assert p.exists() and p.stat().st_size > 10000 with ZipFile(p) as z: names=z.namelist() assert '[Content_Types].xml' in names slides=[n for n in names if n.startswith('ppt/slides/slide') and n.endswith('.xml')] print('size_bytes',p.stat().st_size,'slide_xml',len(slides)) r=Presentation(str(p)) assert len(r.slides)==12 print('verified',len(r.slides),'slides') PY

Simple 12-slide journal presentation created from the attached review article. It includes background, methods, key findings for humerus and distal femur, clinical evidence, appraisal, take-home points, and discussion questions.

Helical Plating Journal Presentation

Presentation · PPTX

add basic concepts to it

Reading File
Reading File
Browsing Directory

~/

Finding Sources
Searching PubMed

helical plating fractures

Searching the Web

helical plating fracture fixation basic concepts AO Foundation

Reading File
Running Command

python - <<'PY' from pptx import Presentation p='/tmp/workspace/helical-plating-journal-presentation/output/Helical_Plating_Journal_Presentation.pptx' r=Presentation(p) print('Slides:',len(r.slides)) for i,s in enumerate(r.slides,1): t=[] for sh in s.shapes: if getattr(sh,'has_text_frame',False) and sh.text.strip(): t.append(sh.text.replace('\n',' | ')) print(i, ' || '.join(t)[:500]) PY

Reading File
Finding Sources
Browsing Directory

~/helical-plating-journal-presentation/output

Running Command

python - <<'PY' 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 pathlib import Path p=Path('/tmp/workspace/helical-plating-journal-presentation/output/Helical_Plating_Journal_Presentation.pptx') prs=Presentation(str(p)); blank=prs.slide_layouts[6] NAVY=RGBColor(18,49,75); TEAL=RGBColor(0,129,139); SKY=RGBColor(222,242,245); ORANGE=RGBColor(232,124,53); INK=RGBColor(36,48,58); GREY=RGBColor(105,117,127); PALE=RGBColor(246,249,250); WHITE=RGBColor(255,255,255) def rect(slide,x,y,w,h,fill,line=None,r=False): s=slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE if r else MSO_SHAPE.RECTANGLE, Inches(x),Inches(y),Inches(w),Inches(h));s.fill.solid();s.fill.fore_color.rgb=fill;s.line.color.rgb=line or fill if r:s.adjustments[0]=.08 return s def txt(slide,text,x,y,w,h,size=20,color=INK,bold=False,align=PP_ALIGN.LEFT,val=MSO_ANCHOR.TOP): b=slide.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));tf=b.text_frame;tf.clear();tf.word_wrap=True;tf.margin_left=tf.margin_right=Inches(.03);tf.margin_top=tf.margin_bottom=Inches(.02);tf.vertical_anchor=val q=tf.paragraphs[0];q.alignment=align;r=q.add_run();r.text=text;r.font.name='Aptos';r.font.size=Pt(size);r.font.bold=bold;r.font.color.rgb=color return b def bullet(slide,items,x,y,w,h,size=16): b=slide.shapes.add_textbox(Inches(x),Inches(y),Inches(w),Inches(h));tf=b.text_frame;tf.clear();tf.word_wrap=True;tf.margin_left=Inches(.12);tf.margin_right=Inches(.04) for i,it in enumerate(items): q=tf.paragraphs[0] if i==0 else tf.add_paragraph();q.text=it;q.level=0;q.font.name='Aptos';q.font.size=Pt(size);q.font.color.rgb=INK;q.space_after=Pt(8);q.bullet=True return b def header(s,heading,sub): txt(s,'BASIC CONCEPTS',.55,.28,12,.28,10,TEAL,True);txt(s,heading,.55,.60,12.2,.55,28,NAVY,True);txt(s,sub,.56,1.16,12,.30,12,GREY);rect(s,.55,1.55,12.23,.025,TEAL) def footer(s): rect(s,0,7.18,13.333,.32,NAVY);txt(s,'Kraus et al. Eur J Trauma Emerg Surg. 2025;51:203. doi:10.1007/s00068-025-02871-1',.55,7.23,10.9,.16,8,WHITE) # slide A s=prs.slides.add_slide(blank);header(s,'Fracture fixation: the basic goal','Fix the bone while protecting the biology needed for healing') for i,(h,b,c) in enumerate([('1. Reduce','Restore length, alignment and rotation.',TEAL),('2. Stabilize','Provide enough mechanical stability for the fracture pattern.',ORANGE),('3. Protect biology','Minimize further soft-tissue and periosteal injury.',TEAL),('4. Mobilize','Aim for durable fixation that allows safe rehabilitation.',ORANGE)]): x=.75+(i%2)*6.15;y=1.95+(i//2)*1.85 rect(s,x,y,5.65,1.35,PALE,PALE,True);rect(s,x,y,.14,1.35,c,c);txt(s,h,x+.38,y+.22,4.8,.3,19,NAVY,True);txt(s,b,x+.38,y+.70,4.85,.37,15,INK) rect(s,.82,5.98,11.7,.62,SKY,SKY,True);txt(s,'Principle: fixation must balance mechanical strength with a biological environment that supports union.',1.05,6.16,11.2,.23,15,NAVY,True,PP_ALIGN.CENTER);footer(s) # slide B s=prs.slides.add_slide(blank);header(s,'Basic biomechanics','What forces must a plate construct resist?') items=[('Axial compression','Weight-bearing force shortens the construct.'),('Bending','Creates tension on one side and compression on the other.'),('Torsion','Rotational force can cause shear at the fracture gap.'),('Shear','Parallel displacement of fragments can impair stability.')] for i,(h,b) in enumerate(items): x=.75+i*3.08;rect(s,x,2.0,2.55,2.5,PALE,PALE,True);rect(s,x,2.0,2.55,.48,TEAL if i%2==0 else ORANGE,TEAL if i%2==0 else ORANGE,True);txt(s,h,x+.15,2.10,2.25,.22,15,WHITE,True,PP_ALIGN.CENTER);txt(s,b,x+.25,2.75,2.05,.75,14,INK,False,PP_ALIGN.CENTER) # simple force arrows txt(s,['↓','↔','⟳','⇆'][i],x+.82,3.65,.85,.5,30,NAVY,True,PP_ALIGN.CENTER) rect(s,.9,5.2,11.55,1.14,SKY,SKY,True);txt(s,'Key terms',1.2,5.43,1.55,.25,17,NAVY,True);txt(s,'Stiffness = resistance to deformation. Strength = load before failure. Durability = ability to tolerate repeated loading.',2.85,5.43,9.05,.42,15,INK);footer(s) # slide C s=prs.slides.add_slide(blank);header(s,'Stability and bone healing','The desired construct depends on fracture pattern and treatment strategy') for x,h,c,subs,heal in [(.8,'Absolute stability',TEAL,['Anatomic reduction','Interfragmentary compression','Minimal motion at fracture'], 'Primary bone healing\nLittle or no callus'),(6.9,'Relative stability',ORANGE,['Alignment restored','Controlled motion remains','Biology preserved with indirect techniques'], 'Secondary bone healing\nCallus formation')]: rect(s,x,1.95,5.55,3.7,PALE,PALE,True);rect(s,x,1.95,5.55,.52,c,c,True);txt(s,h,x+.3,2.08,4.8,.24,18,WHITE,True);bullet(s,subs,x+.38,2.85,4.65,1.55,17);rect(s,x+.5,4.7,4.55,.55,SKY,SKY,True);txt(s,heal,x+.55,4.80,4.45,.30,14,NAVY,True,PP_ALIGN.CENTER) rect(s,.85,6.08,11.65,.48,NAVY,NAVY,True);txt(s,'Helical plating should be judged by its ability to provide appropriate stability without compromising anatomy or biology.',1.05,6.20,11.22,.2,14,WHITE,True,PP_ALIGN.CENTER);footer(s) # reorder newly added 3 slides into index 3 (after original slide 3) sldIdLst=prs.slides._sldIdLst nodes=list(sldIdLst) new=nodes[-3:] for n in new: sldIdLst.remove(n) for j,n in enumerate(new): sldIdLst.insert(3+j,n) # update footer numbers based on bottom shapes for idx,slide in enumerate(prs.slides,1): for sh in slide.shapes: if getattr(sh,'has_text_frame',False) and sh.top > Inches(7.15): if sh.text.strip().isdigit(): sh.text_frame.paragraphs[0].clear();r=sh.text_frame.paragraphs[0].add_run();r.text=str(idx);r.font.name='Aptos';r.font.size=Pt(9);r.font.bold=True;r.font.color.rgb=WHITE # save prs.save(str(p)) print('saved',p,'slides',len(prs.slides)) PY python - <<'PY' from pptx import Presentation p='/tmp/workspace/helical-plating-journal-presentation/output/Helical_Plating_Journal_Presentation.pptx' r=Presentation(p) print('slide_count',len(r.slides)) for i in range(1,8): texts=[] for sh in r.slides[i-1].shapes: if getattr(sh,'has_text_frame',False) and sh.text.strip():texts.append(sh.text.split('\n')[0]) print(i, texts[:3]) PY

Running Command

python - <<'PY' from pptx import Presentation from pptx.util import Inches, Pt from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN p='/tmp/workspace/helical-plating-journal-presentation/output/Helical_Plating_Journal_Presentation.pptx' prs=Presentation(p) WHITE=RGBColor(255,255,255) for idx, slide in enumerate(prs.slides,1): existing=False for sh in slide.shapes: if getattr(sh,'has_text_frame',False) and sh.left > Inches(12) and sh.top > Inches(7.15): existing=True break if not existing: box=slide.shapes.add_textbox(Inches(12.25), Inches(7.22), Inches(.5), Inches(.16)) tf=box.text_frame;tf.clear();tf.margin_left=tf.margin_right=tf.margin_top=tf.margin_bottom=0 para=tf.paragraphs[0];para.alignment=PP_ALIGN.RIGHT run=para.add_run();run.text=str(idx);run.font.name='Aptos';run.font.size=Pt(9);run.font.bold=True;run.font.color.rgb=WHITE prs.save(p) print('saved') PY python - <<'PY' from pathlib import Path from zipfile import ZipFile from pptx import Presentation p=Path('/tmp/workspace/helical-plating-journal-presentation/output/Helical_Plating_Journal_Presentation.pptx') assert p.exists() and p.stat().st_size > 10000 with ZipFile(p) as z: slides=[n for n in z.namelist() if n.startswith('ppt/slides/slide') and n.endswith('.xml')] assert len(slides)==15 r=Presentation(str(p)); assert len(r.slides)==15 for i in (4,5,6): alltext=' '.join(s.text for s in r.slides[i-1].shapes if getattr(s,'has_text_frame',False)) assert 'BASIC CONCEPTS' in alltext print('verified:',p.stat().st_size,'bytes;',len(r.slides),'slides') PY

Added 3 basic-concept slides before the methods section:
  1. Goals of fracture fixation
  2. Basic biomechanics: compression, bending, torsion, and shear
  3. Absolute versus relative stability and bone healing
The updated presentation now has 15 slides.

Helical Plating Journal Presentation

Presentation · PPTX

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