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

Method to_html

utils/src/presentation.py:134–149  ·  view source on GitHub ↗

Convert the text frame to HTML. Args: style_args (StyleArg): The style arguments for HTML conversion. Returns: str: The HTML representation of the text frame.

(self, style_args: StyleArg)

Source from the content-addressed store, hash-verified

132 )
133
134 def to_html(self, style_args: StyleArg):
135 """
136 Convert the text frame to HTML.
137
138 Args:
139 style_args (StyleArg): The style arguments for HTML conversion.
140
141 Returns:
142 str: The HTML representation of the text frame.
143 """
144 if not self.is_textframe:
145 return ""
146 repr_list = [
147 para.to_html(style_args) for para in self.paragraphs if para.idx != -1
148 ]
149 return "\n".join([INDENT * self.level + repr for repr in repr_list])
150
151 def __repr__(self):
152 if not self.is_textframe:

Callers

nothing calls this directly

Calls 1

to_htmlMethod · 0.45

Tested by

no test coverage detected