feat(slides): add add-slide, list-slides, and delete-slide commands#214
Merged
steipete merged 6 commits intoopenclaw:mainfrom Feb 13, 2026
Merged
feat(slides): add add-slide, list-slides, and delete-slide commands#214steipete merged 6 commits intoopenclaw:mainfrom
steipete merged 6 commits intoopenclaw:mainfrom
Conversation
Adds a new `gog slides add-slide <presentationId> <image>` command that appends a slide with a full-bleed image and optional speaker notes using the native Google Slides API (presentations.batchUpdate). Workflow: create a deck with `gog slides create`, then add slides one at a time with this command. Supports --notes for inline text and --notes-file for multiline markdown speaker notes. Also registers ServiceSlides in the auth layer with proper scopes and readonly support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
list-slides shows all slide object IDs in a presentation. delete-slide removes a slide by its object ID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow inserting a slide before a specific existing slide ID instead of always appending to the end of the presentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds three new commands to support in-place editing of existing slides: - `slides read-slide` — shows slide content including speaker notes, text elements, and image references (supports --json output) - `slides update-notes` — updates speaker notes on an existing slide without deleting/re-adding (--notes or --notes-file) - `slides replace-slide` — atomically swaps the image on an existing slide using the ReplaceImage API, optionally updating notes in the same batch operation These eliminate the error-prone delete+add-before workflow when editing slides in existing decks. Closes #1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Resolves chrismdp#1 |
5 tasks
Collaborator
klodr
pushed a commit
to klodr/gogcli
that referenced
this pull request
Apr 22, 2026
…penclaw#214) * feat(slides): add `slides add-slide` command for full-bleed image slides Adds a new `gog slides add-slide <presentationId> <image>` command that appends a slide with a full-bleed image and optional speaker notes using the native Google Slides API (presentations.batchUpdate). Workflow: create a deck with `gog slides create`, then add slides one at a time with this command. Supports --notes for inline text and --notes-file for multiline markdown speaker notes. Also registers ServiceSlides in the auth layer with proper scopes and readonly support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(slides): add list-slides and delete-slide commands list-slides shows all slide object IDs in a presentation. delete-slide removes a slide by its object ID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(slides): add --before flag to add-slide for insertion ordering Allow inserting a slide before a specific existing slide ID instead of always appending to the end of the presentation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(slides): add read-slide, update-notes, and replace-slide commands Adds three new commands to support in-place editing of existing slides: - `slides read-slide` — shows slide content including speaker notes, text elements, and image references (supports --json output) - `slides update-notes` — updates speaker notes on an existing slide without deleting/re-adding (--notes or --notes-file) - `slides replace-slide` — atomically swaps the image on an existing slide using the ReplaceImage API, optionally updating notes in the same batch operation These eliminate the error-prone delete+add-before workflow when editing slides in existing decks. Closes chrismdp#1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(slides): rebase PR 214, clear notes semantics, and hard-fail missing placeholders (openclaw#214) (thanks @chrismdp) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds native Google Slides API support (
presentations.batchUpdate) for building and editing slide decks programmatically:Creating slides
slides add-slide <presentationId> <image>— appends a slide with a full-bleed image and optional speaker notes (--notesor--notes-filefor multiline markdown)--before <slideId>— insert before a specific slide instead of appending to the endslides list-slides <presentationId>— lists all slides with their object IDsslides delete-slide <presentationId> <slideId>— removes a slide by object IDEditing existing slides
slides read-slide <presentationId> <slideId>— shows slide content: speaker notes, text elements, and image references (supports--jsonoutput)slides update-notes <presentationId> <slideId> --notes/--notes-file— updates speaker notes on an existing slide in-place without deleting/re-addingslides replace-slide <presentationId> <slideId> <image>— atomically swaps the image on a slide via theReplaceImageAPI, optionally updating notes in the same batch (--notesor--notes-file)Workflows
gog slides create "My Deck", thenadd-slidefor each image,delete-slideto remove the default blank slide.list-slidesto get IDs,read-slideto identify content,replace-slideto swap images in-place,update-notesto fix speaker notes — no more error-prone delete+add-before dance.Also registers
ServiceSlidesin the auth layer withpresentations+drivescopes (including readonly support).Changes
internal/googleauth/service.go— registerServiceSlidesin service order, info map, andscopesForServiceWithOptionsinternal/googleapi/slides.go— new Slides API client factory (followssheets.gopattern)internal/cmd/slides.go— add six new subcommands toSlidesCmdinternal/cmd/slides_add_slide.go— uploads image to Drive, creates slide + full-bleed image via batchUpdate, inserts speaker notes, cleans up temp Drive file. Supports--before <slideId>to control insertion position viaInsertionIndexinternal/cmd/slides_list_slides.go— fetches presentation and lists slide numbers + object IDsinternal/cmd/slides_delete_slide.go— deletes a slide by object ID via batchUpdateinternal/cmd/slides_read_slide.go— fetches presentation, finds target slide, extracts speaker notes text, text elements, and image referencesinternal/cmd/slides_update_notes.go— clears existing notes and inserts new text via single batch (DeleteText + InsertText)internal/cmd/slides_replace_slide.go— uploads new image to Drive, uses ReplaceImage API to swap in-place, optionally updates notes in the same batchNote
Requires the Google Slides API to be enabled on the GCP project backing the OAuth client.
Tests
--beforeinsertion,--beforenot found (7 tests)go test ./...)