Functions, constants and colors
The quick presentation function, the constants and the color names.
Quick Functions#
quickPPT#
quickPPT(filename, title, slides)Creates a simple presentation:
slides = [
["Slide Title 1", "Content 1"],
["Slide Title 2", "Content 2"]
]
quickPPT("output.pptx", "Presentation Title", slides)Constants#
Layout Constants#
PPT_LAYOUT_16x9- Widescreen (default)PPT_LAYOUT_16x10- Widescreen variantPPT_LAYOUT_4x3- Traditional
Alignment Constants#
PPT_ALIGN_LEFT,PPT_ALIGN_CENTER,PPT_ALIGN_RIGHTPPT_VALIGN_TOP,PPT_VALIGN_MIDDLE,PPT_VALIGN_BOTTOM
Shape Constants#
PPT_SHAPE_RECT,PPT_SHAPE_ROUND_RECTPPT_SHAPE_ELLIPSE,PPT_SHAPE_LINEPPT_SHAPE_TRIANGLE,PPT_SHAPE_DIAMOND,PPT_SHAPE_ARROW
Color Reference#
Named Colors#
black, white, red, green, blue, yellow, orange, purple, gray/grey, navy, teal, maroon, silver, lime, aqua, fuchsia, olive, darkblue, darkgreen, coral, charcoal
Hex Colors#
ppt.setBackground("1E2761") # Without #
ppt.addTextBox("Hi", 1, 1, 2, 1, [:color = "#FF5733"]) # With #