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

Method build

utils/src/presentation.py:905–927  ·  view source on GitHub ↗

Rebuild this table on a pptx slide.

(self, slide: PPTXSlide)

Source from the content-addressed store, hash-verified

903 )
904
905 def build(self, slide: PPTXSlide):
906 """
907 Rebuild this table on a pptx slide.
908 """
909 # Use shape bounds from style if available
910 table_shape = slide.shapes.add_table(
911 self.data["rows"],
912 self.data["cols"],
913 **self.style["shape_bounds"]
914 )
915 pptx_table = table_shape.table
916
917 # Populate text in each cell
918 for r in range(self.data["rows"]):
919 for c in range(self.data["cols"]):
920 pptx_table.cell(r, c).text = self.data["content"][r][c]
921
922 # Apply additional styling if desired (fill, borders, etc.)
923 # For example:
924 # apply_fill(table_shape, self.style["fill"])
925 # dict_to_object(self.style["shape_bounds"], table_shape, exclude=...)
926
927 return table_shape
928
929 def to_html(self, style_args: StyleArg) -> str:
930 """

Callers 3

buildMethod · 0.45
buildMethod · 0.45
build_slideMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected