mirror of
https://github.com/hoshikawa2/openclaw-oci-pptx.git
synced 2026-03-03 16:09:35 +00:00
First commit
This commit is contained in:
@@ -76,9 +76,14 @@ class RedwoodSafePPT:
|
||||
return self.layouts[name]
|
||||
|
||||
def add_content(self, title: str, subhead: str, body: str):
|
||||
|
||||
slide = self.prs.slides.add_slide(self._layout(self.LAYOUT_CONTENT))
|
||||
|
||||
text_placeholders = [ph for ph in slide.placeholders if getattr(ph, "has_text_frame", False)]
|
||||
text_placeholders = [
|
||||
ph for ph in slide.placeholders
|
||||
if ph.has_text_frame
|
||||
]
|
||||
|
||||
if len(text_placeholders) < 2:
|
||||
raise RuntimeError("Content layout must have at least 2 text placeholders.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user