slidedeckai.helpers.pptx_helper.get_slide_placeholders#
- slidedeckai.helpers.pptx_helper.get_slide_placeholders(slide: Slide, layout_number: int, is_debug: bool = False) list[tuple[int, str]][source]#
Return the index and name (lower case) of all placeholders present in a slide, except the title placeholder.
A placeholder in a slide is a place to add content. Each placeholder has a name and an index. This index is not a list index; it is a key used to look up a dict and may be non-contiguous. The title placeholder always has index 0. User-added placeholders get indices starting from 10.
With user-edited or added placeholders, indices may be difficult to track. This function returns the placeholders’ names as well, which may help distinguish between placeholders.
- Parameters:
slide – The slide.
layout_number – The layout number used by the slide.
is_debug – Whether to print debugging statements.
- Returns:
A list of (index, name) tuples for placeholders present in the slide, excluding the title placeholder.
- Return type:
list[tuple[int, str]]