help me revise this powerpoint, make it more concise at images, change designs
https://docs.google.com/presentation/d/1gytmQb-6ys5xEGthjfjzWjJo-6aHMNbI/edit?slide=id.g3efca661e39_0_0#slide=id.g3efca661e39_0_0
https://docs.google.com/presentation/d/1gytmQb-6ys5xEGthjfjzWjJo-6aHMNbI/edit
/tmp/workspace
mkdir -p "/tmp/workspace/presentation-revision/input" "/tmp/workspace/presentation-revision/output" && python -c "import urllib.request; u='https://docs.google.com/presentation/d/1gytmQb-6ys5xEGthjfjzWjJo-6aHMNbI/export/pptx'; urllib.request.urlretrieve(u, '/tmp/workspace/presentation-revision/input/source.pptx')" && file "/tmp/workspace/presentation-revision/input/source.pptx" && ls -lh "/tmp/workspace/presentation-revision/input/source.pptx"
python - <<'PY' from pptx import Presentation from pptx.util import Emu p='/tmp/workspace/presentation-revision/input/source.pptx' prs=Presentation(p) print('slides',len(prs.slides),'size',prs.slide_width,prs.slide_height) for n,s in enumerate(prs.slides,1): print('\n---SLIDE',n,'layout',s.slide_layout.name,'---') for sh in s.shapes: info=f'{sh.shape_type} {sh.name} ({Emu(sh.left).inches:.2f},{Emu(sh.top).inches:.2f},{Emu(sh.width).inches:.2f},{Emu(sh.height).inches:.2f})' if sh.has_text_frame and sh.text_frame.text.strip(): info+=' TEXT='+repr(sh.text_frame.text.replace('\n',' | ')) print(info) PY
cat > "/tmp/workspace/presentation-revision/rebuild.py" <<'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_TYPE, MSO_AUTO_SHAPE_TYPE from pptx.dml.color import RGBColor from pptx.enum.dml import MSO_THEME_COLOR from io import BytesIO import re, os src='/tmp/workspace/presentation-revision/input/source.pptx' out='/tmp/workspace/presentation-revision/output/Orthopaedic_Surgery_Concise_Redesigned.pptx' old=Presentation(src); prs=Presentation(); prs.slide_width=old.slide_width; prs.slide_height=old.slide_height blank=prs.slide_layouts[6] # colors NAVY=RGBColor(14,31,51); BLUE=RGBColor(24,89,142); TEAL=RGBColor(22,150,150); SKY=RGBColor(229,242,247); PALE=RGBColor(246,249,251); WHITE=RGBColor(255,255,255); TEXT=RGBColor(36,51,64); MUTED=RGBColor(94,112,126); ORANGE=RGBColor(240,154,54) sections={1:('ORTHOPAEDIC SURGERY','Residents lecture | core concepts'),11:('TRAUMA','Fractures & dislocations'),40:('SPORTS MEDICINE','Common shoulder and knee injuries'),45:('ORTHOPAEDIC ONCOLOGY','Pattern recognition in bone tumors'),59:('PAEDIATRIC ORTHOPAEDICS','Development, growth and congenital conditions')} # strong curated slides where original chunks too dense custom={2:['Orthopaedic trauma','Sports medicine','Orthopaedic oncology','Paediatric orthopaedics'],3:['Restore anatomy and alignment','Stabilize to enable early mobility','Repair or reconstruct to restore function'],6:['Open communication between fracture and environment','Usually high-energy injury','Priorities: antibiotics, irrigation and debridement','Protect soft tissues, vessels and nerves'],9:['Orthopaedic emergency: rising compartment pressure','Pain out of proportion and pain on passive stretch','Paresthesia, pallor, paralysis and pulselessness are late signs','Immediate assessment and decompression when indicated'],12:['Most involve the middle third','Typical care: sling and early range of motion','Consider ORIF when markedly displaced, shortened, or skin-threatening'],13:['Usually anterior and recurrent in young patients','Assess for Bankart, Hill-Sachs and rotator-cuff injury','Check axillary nerve function','Posterior dislocation: consider seizure or electric injury'],14:['Obtain AP, scapular-Y and axillary views','Perform closed reduction when appropriate','Short sling period followed by rehabilitation'],15:['Older adults: fall onto shoulder','Younger adults: high-energy trauma','Minimally displaced: sling plus early physiotherapy','Displaced: consider fixation or arthroplasty'],16:['Four segments: head, greater tuberosity, lesser tuberosity, shaft','A segment is displaced at >1 cm or >45°','Most fractures are minimally displaced'],18:['Mechanism: direct trauma or fall','Check radial nerve function and wrist drop','Most palsies are neurapraxias','Holstein-Lewis: distal-third shaft pattern'],19:['Coaptation splint then functional brace','Follow alignment and healing with serial radiographs','Radial nerve palsy alone does not preclude nonoperative care','ORIF for unacceptable alignment or specific indications'],20:['Often follows a fall onto an extended elbow','High risk of elbow stiffness','Fixation is often needed','Start range of motion early when safe'],21:['Simple: urgent reduction, brief splinting, early ROM','Terrible triad: dislocation + radial head + coronoid fracture','Often requires ligament repair and bony stabilization'],22:['Brief sling then early motion for most fractures','Operate for displacement, mechanical block, dislocation, or wrist pain'],23:['Both-bone adult forearm fractures usually need plate fixation','Nightstick: isolated ulnar fracture after direct blow','Nonoperative care only when alignment is acceptable'],24:['Monteggia: proximal ulna fracture + radial-head dislocation','Galeazzi: radius fracture + distal radioulnar joint disruption','Both typically require ORIF'],25:['Colles: dorsal displacement after FOOSH in extension','Smith: volar displacement after FOOSH in flexion'],26:['Chauffeur: radial styloid fracture extending into wrist','Barton: intra-articular rim fracture with radiocarpal dislocation'],28:['Most common carpal fracture','Snuffbox tenderness after trauma = scaphoid until proved otherwise','Risk: nonunion and avascular necrosis','Nondisplaced: thumb-spica cast | displaced: ORIF'],29:['Instability requires disruption at two points in pelvic ring','Major concern: life-threatening haemorrhage','Look for associated visceral and neurovascular injury'],30:['Open-book: AP force widens symphysis','Lateral compression: crush pattern','Vertical shear: highly unstable with major blood-loss risk'],31:['Assess bleeding, deformity and pelvic tenderness','AP pelvic radiograph is useful in unstable patients','CT with IV contrast defines injury and active bleeding'],32:['Unstable patient: resuscitate and apply pelvic binder','Stable/minimally displaced: usually nonoperative','Fix unstable ring disruptions and displaced sacral/iliac injuries'],33:['Check sciatic nerve: foot drop and dorsal-foot sensation','Reduce urgently to reduce AVN risk','Open reduction if irreducible or intra-articular fragment'],34:['Older adult with low-energy fall, often osteoporosis','Complications: VTE, pneumonia, pressure injury and mortality','Surgery usually enables pain control and early mobilisation'],35:['Intracapsular fracture','Nondisplaced: internal fixation','Displaced in older adults: hemiarthroplasty or total hip arthroplasty'],37:['High-energy injury','Watch for thromboembolism and ARDS','Early intramedullary nailing when stable','External fixation for damage-control situations'],38:['Common long-bone fracture','High-energy injury can coexist with compartment syndrome','Minimal angulation: immobilisation','Most need intramedullary nailing'],39:['Maisonneuve: proximal fibula + medial ankle injury','Lisfranc: tarsometatarsal disruption','Calcaneus: often after fall from height','Jones: fifth-metatarsal metaphyseal-diaphyseal junction'],41:['Overhead or repetitive pulling mechanism','Pain, weakness and reduced motion','Initial care is usually nonoperative','Post-op rehabilitation: passive, then active, then strengthening'],42:['MCL: most frequently injured knee ligament, usually nonoperative','Unhappy triad: ACL + MCL + medial meniscus','Typical mechanism: valgus force to a planted leg'],44:['Mechanism: pivoting/cutting or contact injury','Symptoms: swelling, instability and reduced ROM','Examine with Lachman test; MRI supports diagnosis','Reconstruct active patients with functional instability'],46:['Red flags: night pain or pain unrelated to activity','Age and lesion location narrow the differential','Radiographs are the foundation; add targeted labs and imaging'],47:['Common primary malignant bone tumour in adolescents','Typical site: distal femur or proximal tibia','X-ray: sunburst pattern or Codman triangle','Stage lungs and whole bone; treatment combines chemotherapy and surgery'],49:['Often affects patients under 25 years','Diaphysis of a long bone; may mimic infection','X-ray: onion-skin reaction','Treatment: chemotherapy plus surgery or radiotherapy'],50:['Typically affects adults over 40','Common sites: pelvis, shoulder and ribs','X-ray may show popcorn calcification','Primary treatment: wide surgical excision'],51:['Young adults; often mandible, femur or pelvis','Painful lesion with soap-bubble appearance','Treatment: wide excision'],52:['Metadiaphyseal destructive lesion with soft-tissue extension','May present with pain or pathologic fracture','Treatment: wide surgical excision'],53:['Benign but locally aggressive tumour','Typically around knee in adults 20-40','Eccentric epimetaphyseal lytic lesion','Curettage with adjuvant or excision for selected cases'],54:['Usually presents in the 40s; often long bones','Diagnosis requires histology, often large B-cell lymphoma','Treat with systemic therapy and radiotherapy; stabilize fractures'],55:['Arises from notochord remnants in midline bones','Usually sacral and in adults over 50','Can cause bowel or bladder symptoms','Management: surgical excision and reconstruction'],56:['Plasma-cell malignancy','CRAB: hypercalcaemia, renal dysfunction, anaemia, bone disease','X-rays: punched-out lytic lesions','Systemic therapy plus stabilization/RT when indicated'],58:['Most common malignant process involving bone','Common primaries: breast, lung, thyroid, kidney, prostate','Often axial skeleton and proximal long bones','Stage with imaging; biopsy if primary remains unclear'],60:['~2 per 1,000 births','Risk: macrosomia, forceps, breech, prolonged labour','Erb-Duchenne: C5-C6, weak shoulder abduction/external rotation','Hand is typically spared'],61:['Lower plexus injury can produce ipsilateral Horner syndrome','Rehabilitation prevents contracture','Consider early surgery if elbow flexion has not returned by 3 months'],62:['Classify physeal injuries systematically','Assess alignment, growth potential and associated injury','Follow for growth arrest or deformity'],63:['Risk factors: first-born female, family history, breech','Exam: Ortolani and Barlow','Ultrasound is preferred in neonates','Pavlik harness <6 months; reduction/cast for later presentation'],64:['Osteonecrosis of proximal femoral epiphysis','Groin or knee pain, limp and reduced hip motion','Management focuses on containment and preserving motion'],65:['Adolescents, often 10-16 years','Epiphysis slips on femoral neck; may present with limp or thigh pain','Treat with percutaneous in-situ screw fixation'],66:['Fixed equinovarus deformity with tight Achilles and medial soft tissues','First-line treatment: Ponseti serial casting','Late presentation may require soft-tissue surgery'],67:['Active adolescents with tibial-tubercle pain','Traction apophysitis at patellar tendon insertion','X-ray may show ossicles','Manage with activity modification and symptom control']} def add_rect(slide,x,y,w,h,color, radius=False): sh=slide.shapes.add_shape(MSO_AUTO_SHAPE_TYPE.ROUNDED_RECTANGLE if radius else MSO_AUTO_SHAPE_TYPE.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 add_text(slide,x,y,w,h,text,size=20,color=TEXT,bold=False,font='Aptos',align=None): tb=slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)); tf=tb.text_frame; tf.clear(); tf.word_wrap=True; tf.margin_left=0; tf.margin_right=0; tf.margin_top=0; tf.margin_bottom=0 p=tf.paragraphs[0]; p.text=text; p.font.name=font; p.font.size=Pt(size); p.font.bold=bold; p.font.color.rgb=color if align: p.alignment=align return tb def get_title(slide): vals=[] for s in slide.shapes: if s.has_text_frame and s.text_frame.text.strip(): if s.is_placeholder and 'TITLE' in str(s.placeholder_format.type): return s.text_frame.text.strip().replace('\n',' ') vals.append(s.text_frame.text.strip()) return vals[0] if vals else '' def chunks(slide): tx=[] for s in slide.shapes: if s.has_text_frame and s.text_frame.text.strip() and not (s.is_placeholder and 'TITLE' in str(s.placeholder_format.type)): tx += [x.strip() for x in re.split(r'\n|\t|(?<=[.!?])\s+',s.text_frame.text) if x.strip()] # clean out=[] for x in tx: x=re.sub(r'\s+',' ',x).strip(' |') if len(x)>12 and x.upper()!=x or len(x)>15: out.append(x) # representative, avoid huge pieces return [x[:115].rstrip() for x in out[:5]] def extract_imgs(slide): out=[] for s in slide.shapes: if s.shape_type==MSO_SHAPE_TYPE.PICTURE: try: out.append(BytesIO(s.image.blob)) except: pass return out def add_image(slide,img,x,y,w,h): try: slide.shapes.add_picture(img, Inches(x), Inches(y), width=Inches(w), height=Inches(h)) except: pass def header(slide,title,section, n): add_rect(slide,0,0,10,0.18,TEAL); add_text(slide,.58,.37,7.9,.5,title.upper(),25,NAVY,True); add_text(slide,.59,.92,7,.22,section.upper(),8,TEAL,True); add_text(slide,9.15,.45,.35,.2,f'{n:02d}',9,MUTED,True,align=PP_ALIGN.RIGHT) def content_slide(i, oldslide): s=prs.slides.add_slide(blank); title=get_title(oldslide); title=title.replace('\n',' ') section='TRAUMA' if i<40 else 'SPORTS MEDICINE' if i<45 else 'ONCOLOGY' if i<59 else 'PAEDIATRICS' header(s,title,section,i) add_rect(s,.55,1.30,5.15,3.72,WHITE,True) pts=custom.get(i,chunks(oldslide)) if not pts: pts=['Key teaching point retained from the original lecture.'] # bullet list y=1.62 for j,p in enumerate(pts[:5]): add_rect(s,.88,y+.12,.12,.12,TEAL,True); add_text(s,1.15,y,4.15,.5,p,15,TEXT,False); y+=.64 if len(p)<74 else .78 imgs=extract_imgs(oldslide) if imgs: add_rect(s,6.05,1.30,3.4,3.72,SKY,True); add_image(s,imgs[0],6.22,1.47,3.06,3.36) else: add_rect(s,6.05,1.30,3.4,3.72,NAVY,True); add_text(s,6.45,2.05,2.6,.35,'CLINICAL PEARL',12,RGBColor(120,220,210),True,align=PP_ALIGN.CENTER); add_text(s,6.45,2.54,2.6,1.25,pts[0],19,WHITE,True,align=PP_ALIGN.CENTER) add_text(s,.59,5.33,7,.15,'ORTHOPAEDIC SURGERY | RESIDENTS LECTURE',7,MUTED,True) def section_slide(i, title, subtitle): s=prs.slides.add_slide(blank); add_rect(s,0,0,10,5.625,NAVY); add_rect(s,.72,.75,.15,3.9,TEAL); add_text(s,1.18,1.62,7.8,.8,title,31,WHITE,True); add_text(s,1.2,2.60,7.2,.42,subtitle,17,RGBColor(190,218,229)); add_text(s,1.2,4.55,5,.2,'ORTHOPAEDIC SURGERY | RESIDENTS LECTURE',8,RGBColor(120,220,210),True) def collage_slide(i,oldslide): # concise full-image reference slide s=prs.slides.add_slide(blank); title=get_title(oldslide); header(s,title,'IMAGE REFERENCE',i); imgs=extract_imgs(oldslide) if len(imgs)>=2: add_rect(s,.55,1.28,4.2,3.75,SKY,True); add_image(s,imgs[0],.72,1.45,3.86,3.4); add_rect(s,5.2,1.28,4.25,3.75,SKY,True); add_image(s,imgs[1],5.37,1.45,3.91,3.4) elif imgs: add_rect(s,1.15,1.2,7.7,3.9,SKY,True); add_image(s,imgs[0],1.35,1.4,7.3,3.5) else: content_slide(i,oldslide) add_text(s,.59,5.33,7,.15,'ORTHOPAEDIC SURGERY | RESIDENTS LECTURE',7,MUTED,True) for i,sl in enumerate(old.slides,1): if i in sections: section_slide(i,*sections[i]) elif i in [4,7,8,10,17,27,36,43,48,57,62]: collage_slide(i,sl) else: content_slide(i,sl) prs.save(out) print(out, len(prs.slides)) PY python "/tmp/workspace/presentation-revision/rebuild.py" && ls -lh "/tmp/workspace/presentation-revision/output/Orthopaedic_Surgery_Concise_Redesigned.pptx"
python - <<'PY' p='/tmp/workspace/presentation-revision/rebuild.py' s=open(p).read() s=s.replace("else: content_slide(i,oldslide)\n add_text(s,.59,5.33,7,.15,'ORTHOPAEDIC SURGERY | RESIDENTS LECTURE',7,MUTED,True)\nfor i,sl", "else:\n content_slide(i,oldslide)\n return\n add_text(s,.59,5.33,7,.15,'ORTHOPAEDIC SURGERY | RESIDENTS LECTURE',7,MUTED,True)\nfor i,sl") open(p,'w').write(s) PY python "/tmp/workspace/presentation-revision/rebuild.py" python - <<'PY' from pptx import Presentation p='/tmp/workspace/presentation-revision/output/Orthopaedic_Surgery_Concise_Redesigned.pptx' prs=Presentation(p) print('slides:',len(prs.slides)) for i,s in enumerate(prs.slides,1): t=[] for sh in s.shapes: if sh.has_text_frame and sh.text_frame.text.strip():t.append(sh.text_frame.text.replace('\n',' | ')) print(i, ' :: '.join(t[:3])[:180], 'shapes',len(s.shapes)) PY
python - <<'PY' p='/tmp/workspace/presentation-revision/rebuild.py' s=open(p).read().replace("elif i in [4,7,8,10,17,27,36,43,48,57,62]: collage_slide(i,sl)","elif i in [4,8,17,27,36,43,62]: collage_slide(i,sl)") open(p,'w').write(s) PY python "/tmp/workspace/presentation-revision/rebuild.py" python - <<'PY' from pptx import Presentation p='/tmp/workspace/presentation-revision/output/Orthopaedic_Surgery_Concise_Redesigned.pptx' prs=Presentation(p) print('slide count',len(prs.slides)) print('dimensions',prs.slide_width,prs.slide_height) for n in [1,2,3,4,6,11,40,45,59,67]: s=prs.slides[n-1] text=' | '.join(sh.text_frame.text for sh in s.shapes if sh.has_text_frame and sh.text_frame.text.strip()) print(n, text[:200]) PY ls -lh "/tmp/workspace/presentation-revision/output/Orthopaedic_Surgery_Concise_Redesigned.pptx"
python - <<'PY' from pptx import Presentation from zipfile import ZipFile p='/tmp/workspace/presentation-revision/output/Orthopaedic_Surgery_Concise_Redesigned.pptx' with ZipFile(p) as z: bad=z.testzip() print('zip_integrity:', 'OK' if bad is None else bad) prs=Presentation(p) assert len(prs.slides)==67 assert all(len(slide.shapes)>0 for slide in prs.slides) print('pptx_opened:',len(prs.slides),'slides; all slides populated') PY
can you resend the link
can you make it into pptc
pptx
Orthopaedic Surgery Concise Redesigned
Presentation · PPTX
send me google slides link
Orthopaedic Surgery Concise Redesigned
Presentation · PPTX