Add `gog sheets links` (alias: hyperlinks) command that retrieves
hyperlinks embedded in cells via spreadsheets.get with IncludeGridData.
Mirrors the existing `notes` command pattern using the CellData.Hyperlink field.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add integration tests verifying isDayExpr() integration:
- TestResolveTimeRangeWithDefaultsToTomorrowEndOfDay: verifies
--to tomorrow expands to end-of-day (23:59:59.999999999)
- TestResolveTimeRangeWithDefaultsToNowNoExpansion: verifies
--to now does NOT expand to end-of-day (remains current time)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add boolTrue/boolFalse constants for string "true"/"false" values
- Rename shadowed err variable to writeErr in test file
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add integration tests verifying isDayExpr() integration:
- TestResolveTimeRangeWithDefaultsToTomorrowEndOfDay: verifies
--to tomorrow expands to end-of-day (23:59:59.999999999)
- TestResolveTimeRangeWithDefaultsToNowNoExpansion: verifies
--to now does NOT expand to end-of-day (remains current time)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Distinguish the update command from write by specifying it inserts
text at a specific index position in the document.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Test that --index flag properly rejects zero and negative values
with the expected error message.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Cover the readTextInput function and file path expansion logic
by testing DocsWriteCmd and DocsUpdateCmd with temp files.
Also test error cases: non-existent file, empty file, and
mutual exclusion of --text and --file flags.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add paragraph-number addressing (5d, 3s/.*/text/, $a/text/) and
`docs structure` / `docs cat -N` commands for paragraph-level
document manipulation.
New commands:
- `docs structure` — numbered paragraph list with types (text + JSON)
- `docs cat -N` — cat with [N] paragraph prefixes
Address syntax for `docs sed`:
- Nd (delete paragraph N), N,Md (range delete), $d (last)
- Ns/pat/repl/ (substitute within paragraph N)
- Na/text/ (append after N), Ni/text/ (insert before N)
- --tab flag for multi-tab document support
Testing:
- 24 new unit tests covering parseAddress (13 cases),
parseFullExpr_Addressed (10 cases), resolveAddress (6 cases),
and buildParagraphMap (8 cases). All pass.
- Manual testing against live Google Docs verified: structure,
cat -N, addressed substitute, delete, append, insert, dollar
addressing, and range delete.
- Bug found and fixed during manual testing: addressed a/text/
and i/text/ were parsed by parseAICommand (expects a/pat/text/)
which put text in the pattern field instead of replacement,
producing empty paragraphs. Added parseAddressedAICommand for
the single-field addressed form.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rename inner err to err2 in docs_sed.go and docs_sed_manual.go to fix shadow warnings
- Return non-nil empty response from batchUpdate when no requests (nilnil)
- Hardcode test constants for buildDocWithInlineImage helper (unparam)