import sys
from pptx import Presentation
from pptx.oxml.xmlchemy import OxmlElement
from pptx.oxml.ns import qn
p=Presentation()
for i,(title,body,note) in enumerate([('Quarterly harbor update','Visible slide body text','Remind the room about the tide schedule change.'),('Open questions','Second visible slide body','')],1):
 s=p.slides.add_slide(p.slide_layouts[1]); s.shapes.title.text=title; s.placeholders[1].text=body
 n=s.notes_slide; n.notes_text_frame.text=note
 tree=n._element.find(qn('p:cSld')).find(qn('p:spTree'))
 for j,(typ,txt) in enumerate([('hdr','Harbor briefing header'),('dt','11/21/2026'),('ftr','Confidential notes footer'),('sldNum',str(i)),('sldImg','Slide image placeholder text')],10):
  sp=OxmlElement('p:sp'); nv=OxmlElement('p:nvSpPr'); cn=OxmlElement('p:cNvPr'); cn.set('id',str(j)); cn.set('name',typ); nv.append(cn); nv.append(OxmlElement('p:cNvSpPr')); pr=OxmlElement('p:nvPr'); ph=OxmlElement('p:ph'); ph.set('type',typ); pr.append(ph); nv.append(pr); sp.append(nv); sp.append(OxmlElement('p:spPr'))
  tx=OxmlElement('p:txBody'); tx.append(OxmlElement('a:bodyPr')); tx.append(OxmlElement('a:lstStyle')); para=OxmlElement('a:p'); r=OxmlElement('a:fld' if typ in ('dt','sldNum') else 'a:r')
  if typ in ('dt','sldNum'): r.set('id','{00000000-0000-0000-0000-000000000001}'); r.set('type','slidenum' if typ=='sldNum' else 'datetime1')
  t=OxmlElement('a:t'); t.text=txt; r.append(t); para.append(r); tx.append(para); sp.append(tx); tree.append(sp)
p.save(sys.argv[1] if len(sys.argv)>1 else 'harbor-briefing.pptx')
