First commit

This commit is contained in:
2026-02-27 09:56:07 -03:00
parent d4ed1d298d
commit 89696e5cb9

View File

@@ -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.")