Skip to content

Commit 49af127

Browse files
alextnettosteipete
andauthored
feat: add docs comments subcommand for managing Google Doc comments (#263)
* feat: add `docs comments` subcommand for managing Google Doc comments Add a full `gog docs comments` command tree that provides a doc-centric interface for managing comments on Google Docs via the Drive API v3 comments endpoint. Subcommands: list - List comments (filters resolved by default, --include-resolved to show all) get - Get a single comment with full details including replies add - Add a comment, optionally anchored to quoted text reply - Reply to a comment resolve - Resolve a comment (mark as done), with optional message delete - Delete a comment Key differences from `drive comments`: - `list` filters resolved comments by default (--include-resolved to include) - `list` always shows quoted text column (no separate flag needed) - `resolve` subcommand (drive comments has no equivalent) - Accepts Google Doc URLs in addition to bare IDs (via normalizeGoogleID) - Doc-centric naming and help text Follows existing patterns: uses shared helpers (collectAllPages, tableWriter, formatDateTime, truncateString, normalizeGoogleID, failEmptyExit, dryRunExit, confirmDestructive), same auth/token flow, consistent output formatting. * fix: improve docs comments list and anchoring (#263) (thanks @alextnetto) --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
1 parent c530eb3 commit 49af127

4 files changed

Lines changed: 1103 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- Drive: add `drive ls|search --no-all-drives` to restrict queries to "My Drive" for faster/narrower results. (#258)
1010
- Gmail: add `gmail send --quote` to include quoted original message in replies. (#169) — thanks @terry-li-hm.
1111
- Sheets: add `sheets notes` to read cell notes. (#208) — thanks @andybergon.
12+
- Docs: add `docs comments` for listing and managing Google Doc comments. (#263) — thanks @alextnetto.
1213

1314
### Fixed
1415
- Auth: manual OAuth flow uses an ephemeral loopback redirect port (avoids unsafe/privileged ports in browsers). (#172) — thanks @spookyuser.

internal/cmd/docs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type DocsCmd struct {
2727
Create DocsCreateCmd `cmd:"" name:"create" aliases:"add,new" help:"Create a Google Doc"`
2828
Copy DocsCopyCmd `cmd:"" name:"copy" aliases:"cp,duplicate" help:"Copy a Google Doc"`
2929
Cat DocsCatCmd `cmd:"" name:"cat" aliases:"text,read" help:"Print a Google Doc as plain text"`
30+
Comments DocsCommentsCmd `cmd:"" name:"comments" help:"Manage comments on a Google Doc"`
3031
ListTabs DocsListTabsCmd `cmd:"" name:"list-tabs" help:"List all tabs in a Google Doc"`
3132
Write DocsWriteCmd `cmd:"" name:"write" help:"Write content to a Google Doc"`
3233
Insert DocsInsertCmd `cmd:"" name:"insert" help:"Insert text at a specific position"`

0 commit comments

Comments
 (0)