Skip to content

command query ppt

zmworm edited this page Mar 20, 2026 · 52 revisions

query - PowerPoint (.pptx)

Query selectors for PowerPoint documents.

Element Selectors

Selector Aliases Description
shape textbox Shapes and text boxes
title - Title shapes
picture pic Pictures
video - Videos
audio - Audio clips
equation math, formula Equations
table - Tables
chart - Charts
placeholder - Placeholders
connector connection Connectors
group - Groups

Attributes

Attribute Applies To Description
font shapes Font name (exact match)
font!= shapes Font not equal
title shapes Is title shape (bool)
alt pictures Has alt text (bool)

Generic Attribute Filtering

Syntax Description
[key=value] Attribute equals value
[key!=value] Attribute not equal (\!= accepted for zsh compatibility)
[key~=value] Attribute contains value

Pseudo-Selectors

Selector Description
:contains("text") Shape contains text (case-insensitive)
:text Shorthand for selecting shapes with text content
:no-alt Picture without alt text

Slide Prefix

Filter by slide: slide[2] > shape[font="Arial"]

Examples

# All shapes containing text
officecli query slides.pptx 'shape:contains("Revenue")'

# Pictures without alt text
officecli query slides.pptx "picture:no-alt"

# Title shapes
officecli query slides.pptx "title"

# Shapes on slide 2 with Arial
officecli query slides.pptx 'slide[2] > shape[font="Arial"]'

# Shapes not using Calibri
officecli query slides.pptx "shape[font!=Calibri]"

# All charts
officecli query slides.pptx "chart"

# All tables
officecli query slides.pptx "table"

# Shapes with text (shorthand)
officecli query slides.pptx "shape:text"

# All connectors
officecli query slides.pptx "connector"

# All groups
officecli query slides.pptx "group"

# Generic attribute filtering
officecli query slides.pptx 'shape[fill=#4472C4]'
officecli query slides.pptx 'shape[name~=Title]'

See Also


Based on OfficeCli v1.0.9

Clone this wiki locally