MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / to_pptc

Method to_pptc

utils/src/presentation.py:161–181  ·  view source on GitHub ↗

Convert the text frame to PPTC format. Args: father_idx (int): The index of the parent shape. Returns: str: The PPTC representation of the text frame.

(self, father_idx: int)

Source from the content-addressed store, hash-verified

159 return len(self.text)
160
161 def to_pptc(self, father_idx: int) -> str:
162 """
163 Convert the text frame to PPTC format.
164
165 Args:
166 father_idx (int): The index of the parent shape.
167
168 Returns:
169 str: The PPTC representation of the text frame.
170 """
171 if not self.is_textframe:
172 return ""
173 s = f"[Text id={father_idx}]"
174 for para in self.paragraphs:
175 if para.idx == -1:
176 continue
177 s += f"\n"
178 s += f"[Paragraph id={para.idx}]"
179 s += get_font_pptcstyle(para.font) + f"\n"
180 s += para.text + "\n"
181 return s
182
183
184class ShapeElement:

Callers 4

pptc_text_infoMethod · 0.45
to_pptcMethod · 0.45
to_pptcMethod · 0.45
monkeypatch_renderFunction · 0.45

Calls 1

get_font_pptcstyleFunction · 0.90

Tested by

no test coverage detected