-
Notifications
You must be signed in to change notification settings - Fork 264
Sheets and Docs Fine Grain Editing and Styling #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
adam-skalicky
wants to merge
5
commits into
taylorwilsdon:main
Choose a base branch
from
adam-skalicky:feature/native-styling-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Sheets and Docs Fine Grain Editing and Styling #109
adam-skalicky
wants to merge
5
commits into
taylorwilsdon:main
from
adam-skalicky:feature/native-styling-support
Conversation
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
- Add insert_text_at_line function for line-based text insertion - Add find_and_replace_text function with case sensitivity option - Add create_versioned_document function with backup capability - Include comprehensive input validation and error handling - Update documentation to reflect new capabilities 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…eets This commit implements native styling capabilities for both Google Docs and Google Sheets APIs, providing professional document formatting tools. ## Google Docs Styling Functions: - `format_text_style()`: Apply text formatting including bold, italic, underline, font size/family, text/background colors - `format_paragraph_style()`: Set paragraph formatting with alignment, line spacing, indentation, and spacing - `apply_heading_style()`: Convert text to heading styles (H1-H6) using Google Docs named styles - `create_list()`: Create bullet or numbered lists with configurable nesting levels - `_hex_to_rgb()`: Helper function for hex color conversion to Google Docs RGB format ## Google Sheets Styling Functions: - `format_cell_style()`: Apply cell formatting including bold, italic, colors, alignment, and font properties - `format_cell_borders()`: Add comprehensive border styling with various styles, colors, and widths - `format_number_display()`: Set number formatting (currency, percent, date, scientific, custom patterns) - `_hex_to_rgb_sheets()`: Helper function for hex color conversion to Google Sheets RGB format - `_parse_range_to_grid_range()`: Convert A1 notation to API GridRange format - `_get_format_fields()`: Helper for generating API field specifications ## Key Features: - Range-based operations for precise formatting control - Comprehensive color support with hex codes (#FF0000) - Professional styling options (borders, number formatting, headings) - Input validation and error handling - Efficient batchUpdate API operations - Consistent with existing codebase patterns and standards ## Technical Implementation: - Uses Google APIs batchUpdate operations for performance - Follows existing authentication and error handling patterns - Maintains consistent logging and parameter validation - Implements proper RGB color conversion for both APIs - Supports both named ranges and A1 notation for sheets This enhancement significantly expands the MCP server's document formatting capabilities, enabling professional document creation and styling through the Google Workspace APIs. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Remove unintended changes to uv.lock file to keep dependency management clean. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Owner
|
omg love this, didn't realize you were using it haha I'm sick today but will get this merged asap |
Author
|
I would hold off, seeing some bugs with styling apply. Going to bake in some additional selectors. |
Owner
|
Docs in great depth is now in place in main @adam-skalicky - love to get similar in place for sheets soon |
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.
Currently one shot doc writing works, but modifying existing documents proves to be a challenge. With this PR I aim to add line level editing and styling to docs and sheets.
📄 Google Docs - New Functions (8 total)
Document Modification Functions:
Native Styling Functions:
📊 Google Sheets - New Functions (6 total)
Cell Styling Functions:
Helper Functions: