Skip to content

feat(slides): Get or download a rendered thumbnail for a slide#498

Merged
steipete merged 2 commits intoopenclaw:mainfrom
gianpaj:feat/get-slide-thumbnail-image
Apr 20, 2026
Merged

feat(slides): Get or download a rendered thumbnail for a slide#498
steipete merged 2 commits intoopenclaw:mainfrom
gianpaj:feat/get-slide-thumbnail-image

Conversation

@gianpaj
Copy link
Copy Markdown
Contributor

@gianpaj gianpaj commented Apr 10, 2026

Using the Google Workspace API:
https://developers.google.com/workspace/slides/api/reference/rest/v1/presentations.pages/getThumbnail

# Get a rendered slide thumbnail URL
gog slides thumbnail <presentationId> <slideId>

# Download a rendered slide thumbnail
gog slides thumbnail <presentationId> <slideId> --output ./slide.png

# Control thumbnail size and format
gog slides thumbnail <presentationId> <slideId> --size medium --format jpeg --output ./slide.jpg

Example:

$ gog slides list-slides 1bnEb7_gvB5SH-xxx
Presentation: Mars: The New Frontier (7 slides)

#  OBJECT ID
1  p
2  slide_1
3  slide_2
4  slide_3
5  slide_4
6  slide_5
7  slide_6

$ gog slides thumbnail 1bnEb7_gvB5SH-xxx slide_1 --output slide-2.png

presentationId	1bnEb7_gvB5SH-xxx
slideId	slide_1
url	https://lh7-us.googleusercontent.com/docsdf/xxx-eZm-zzz-yyy=s1600
width	1600
height	900
size	large
format	png
output	slide-2.png
bytes	60950

downloaded img

slide-2 image

@steipete steipete force-pushed the feat/get-slide-thumbnail-image branch from d6f86ad to 10d5252 Compare April 20, 2026 15:52
@steipete steipete merged commit a1fd0a8 into openclaw:main Apr 20, 2026
1 check passed
@steipete
Copy link
Copy Markdown
Collaborator

Landed in a1fd0a8 after a polish pass.

Changes added while landing:

  • --out support with --output alias
  • shared output-file helper for path expansion, parent creation, and private permissions
  • close/write error handling
  • missing presentation-id test plus spec/CHANGELOG entries

Verified locally with go test ./internal/cmd -run TestSlidesThumbnail, make lint, make test, make build, and make ci. Also live-tested with clawdbot@gmail.com by creating a deck, listing the first slide, downloading a medium PNG thumbnail, verifying PNG bytes, and trashing the deck.

Thanks again @gianpaj.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants