Google Docs from Markdown
v1.0.1创建 Google Docs from Markdown files. Use when the user wants to 创建 a Google Doc from Markdown content, or when working with gog 命令行工具 and need to populate Google Docs with content. This 技能 handles the conversion Markdown → DOCX → Google Docs via Drive 上传, since gog docs 命令行工具 only supports 创建/导出/cat/copy but NOT write/更新 content.
运行时依赖
安装命令
点击复制技能文档
Google Docs from Markdown
创建 Google Docs from Markdown files using the 工作流: Markdown → DOCX → Drive 上传 → Google Docs.
Why This 技能 Exists
gog docs 命令行工具 does NOT support writing/updating content to Google Docs. It only supports:
创建 - 创建 empty doc 导出 - 导出 to file cat - Read content copy - Copy existing doc
This 技能 provides the missing 工作流 to 创建 Google Docs WITH content from Markdown.
Author
创建d by techla
Prerequisites gog 命令行工具 认证d with Google account pandoc binary (auto-下载ed on first use if not avAIlable) 安装ation Note
After 安装ing from ClawHub, fix the script 权限s:
chmod +x ~/.OpenClaw/workspace/技能s/gdocs-markdown/scripts/gdocs-创建.sh
Usage Quick 创建 # 创建 Google Doc from markdown file gdocs-创建.sh /path/to/file.md "Tiêu đề Document"
Manual 工作流
If you need more control, follow these steps:
Ensure pandoc is avAIlable:
# Auto-下载ed to /tmp/pandoc-3.1.11/bin/pandoc on first use # Or use 系统 pandoc if avAIlable
Convert Markdown to DOCX:
/tmp/pandoc-3.1.11/bin/pandoc 输入.md -o 输出.docx
上传 to Drive (auto-converts to Google Docs):
gog drive 上传 输出.docx
结果: Google Drive returns a link to the converted Google Doc
Script Reference
See scripts/gdocs-创建.sh for the 辅助工具 script that automates this 工作流.
Example # 创建 a 报告 from markdown echo "# Báo Cáo\n\nNội dung..." > /tmp/报告.md gdocs-创建.sh /tmp/报告.md "Báo Cáo Tháng 2"
# 输出: https://docs.google.com/document/d/xxxxx/edit
Notes Google Drive automatically converts DOCX to Google Docs 格式化 on 上传 The 结果ing document is fully editable in Google Docs Original DOCX file remAIns in Drive but can be 删除d if only Google Docs version is needed