google-slides
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoogle Slides
Google Slides
Lightweight Google Slides integration with standalone OAuth authentication. No MCP server required. Full read/write access.
Requires Google Workspace account. Personal Gmail accounts are not supported.
轻量级Google Slides集成,支持独立OAuth认证,无需MCP服务器,具备完整的读写权限。
需要Google Workspace账户。个人Gmail账户不支持。
First-Time Setup
首次设置
Authenticate with Google (opens browser):
bash
python scripts/auth.py loginCheck authentication status:
bash
python scripts/auth.py statusLogout when needed:
bash
python scripts/auth.py logout通过Google完成认证(将打开浏览器):
bash
python scripts/auth.py login检查认证状态:
bash
python scripts/auth.py status需要时退出登录:
bash
python scripts/auth.py logoutRead Commands
读取命令
All operations via . Auto-authenticates on first use if not logged in.
scripts/slides.pybash
undefined所有操作通过执行。如果未登录,首次使用时会自动完成认证。
scripts/slides.pybash
undefinedGet all text content from a presentation
提取演示文稿中的所有文本内容
python scripts/slides.py get-text "1abc123xyz789"
python scripts/slides.py get-text "https://docs.google.com/presentation/d/1abc123xyz789/edit"
python scripts/slides.py get-text "1abc123xyz789"
python scripts/slides.py get-text "https://docs.google.com/presentation/d/1abc123xyz789/edit"
Find presentations by search query
通过搜索关键词查找演示文稿
python scripts/slides.py find "quarterly report"
python scripts/slides.py find "project proposal" --limit 5
python scripts/slides.py find "quarterly report"
python scripts/slides.py find "project proposal" --limit 5
Get presentation metadata (title, slide count, slide object IDs)
获取演示文稿元数据(标题、幻灯片数量、幻灯片对象ID)
python scripts/slides.py get-metadata "1abc123xyz789"
undefinedpython scripts/slides.py get-metadata "1abc123xyz789"
undefinedWrite Commands
写入命令
bash
undefinedbash
undefinedCreate a new empty presentation
创建新的空白演示文稿
python scripts/slides.py create "Q4 Sales Report"
python scripts/slides.py create "Q4 Sales Report"
Add a blank slide to the end
在末尾添加一张空白幻灯片
python scripts/slides.py add-slide "1abc123xyz789"
python scripts/slides.py add-slide "1abc123xyz789"
Add a slide with a specific layout
添加指定布局的幻灯片
python scripts/slides.py add-slide "1abc123xyz789" --layout TITLE_AND_BODY
python scripts/slides.py add-slide "1abc123xyz789" --layout TITLE_AND_BODY
Add a slide at a specific position (0-based index)
在指定位置添加幻灯片(从0开始的索引)
python scripts/slides.py add-slide "1abc123xyz789" --layout TITLE --at 0
python scripts/slides.py add-slide "1abc123xyz789" --layout TITLE --at 0
Find and replace text across all slides
在所有幻灯片中查找并替换文本
python scripts/slides.py replace-text "1abc123xyz789" "old text" "new text"
python scripts/slides.py replace-text "1abc123xyz789" "Draft" "Final" --match-case
python scripts/slides.py replace-text "1abc123xyz789" "old text" "new text"
python scripts/slides.py replace-text "1abc123xyz789" "Draft" "Final" --match-case
Delete a slide by object ID (use get-metadata to find IDs)
通过对象ID删除幻灯片(使用get-metadata命令查找ID)
python scripts/slides.py delete-slide "1abc123xyz789" "g123abc456"
python scripts/slides.py delete-slide "1abc123xyz789" "g123abc456"
Batch update (advanced - for formatting, inserting shapes, images, etc.)
批量更新(高级功能——用于格式设置、插入形状、图片等)
python scripts/slides.py batch-update "1abc123xyz789" '[{"replaceAllText":{"containsText":{"text":"foo"},"replaceText":"bar"}}]'
undefinedpython scripts/slides.py batch-update "1abc123xyz789" '[{"replaceAllText":{"containsText":{"text":"foo"},"replaceText":"bar"}}]'
undefinedSlide Layouts
幻灯片布局
Available layouts for :
add-slide --layout- - Empty slide (default)
BLANK - - Title slide
TITLE - - Title with body text
TITLE_AND_BODY - - Title with two text columns
TITLE_AND_TWO_COLUMNS - - Title bar only
TITLE_ONLY - - Section divider
SECTION_HEADER - - Single column text
ONE_COLUMN_TEXT - - Main point highlight
MAIN_POINT - - Large number display
BIG_NUMBER
add-slide --layout- - 空白幻灯片(默认)
BLANK - - 标题幻灯片
TITLE - - 标题加正文
TITLE_AND_BODY - - 标题加两栏文本
TITLE_AND_TWO_COLUMNS - - 仅标题栏
TITLE_ONLY - - 节标题
SECTION_HEADER - - 单栏文本
ONE_COLUMN_TEXT - - 重点突出
MAIN_POINT - - 大数字展示
BIG_NUMBER
Presentation ID Format
演示文稿ID格式
You can use either:
- Direct presentation ID:
1abc123xyz789 - Full Google Slides URL:
https://docs.google.com/presentation/d/1abc123xyz789/edit
The scripts automatically extract the ID from URLs.
你可以使用以下两种格式:
- 直接演示文稿ID:
1abc123xyz789 - 完整的Google Slides链接:
https://docs.google.com/presentation/d/1abc123xyz789/edit
脚本会自动从链接中提取ID。
Output Format
输出格式
get-text
get-text
Returns extracted text from all slides, including:
- Presentation title
- Text from shapes/text boxes on each slide
- Table data with cell contents
返回从所有幻灯片中提取的文本,包括:
- 演示文稿标题
- 每张幻灯片上形状/文本框中的文本
- 表格数据及单元格内容
find
find
Returns list of matching presentations:
json
{
"presentations": [
{"id": "1abc...", "name": "Q4 Report", "modifiedTime": "2024-01-15T..."}
],
"nextPageToken": "..."
}返回匹配的演示文稿列表:
json
{
"presentations": [
{"id": "1abc...", "name": "Q4 Report", "modifiedTime": "2024-01-15T..."}
],
"nextPageToken": "..."
}get-metadata
get-metadata
Returns presentation details:
json
{
"presentationId": "1abc...",
"title": "My Presentation",
"slideCount": 15,
"pageSize": {"width": {...}, "height": {...}},
"hasMasters": true,
"hasLayouts": true
}返回演示文稿详情:
json
{
"presentationId": "1abc...",
"title": "My Presentation",
"slideCount": 15,
"pageSize": {"width": {...}, "height": {...}},
"hasMasters": true,
"hasLayouts": true
}Token Management
令牌管理
Tokens stored securely using the system keyring:
- macOS: Keychain
- Windows: Windows Credential Locker
- Linux: Secret Service API (GNOME Keyring, KDE Wallet, etc.)
Service name:
google-slides-skill-oauthAutomatically refreshes expired tokens using Google's cloud function.
令牌通过系统密钥环安全存储:
- macOS:Keychain
- Windows:Windows凭据管理器
- Linux:Secret Service API(GNOME Keyring、KDE Wallet等)
服务名称:
google-slides-skill-oauth会通过Google云函数自动刷新过期令牌。