← 返回
效率工具 中文

Md To Gdoc

Convert markdown files to properly formatted Google Docs. Use when asked to create a Google Doc from markdown, upload markdown to Google Docs, put a .md file...
将 Markdown 文件转换为格式规范的 Google Docs,适用于要求从 Markdown 创建、上传或放置 .md 文件到 Google Docs 的场景。
brennerspear
效率工具 clawhub v1.0.1 1 版本 99814.8 Key: 无需
★ 0
Stars
📥 539
下载
💾 9
安装
1
版本
#latest

概述

Markdown to Google Doc

Convert .md files into Google Docs with proper heading styles, bold, code blocks, lists, links, and blockquotes.

Requirements

  • gog — Google Workspace CLI (must be authenticated: gog auth add )
  • python3 — used for JSON parsing in the script

Quick Start

scripts/md-to-gdoc.sh <file.md> [--title "Title"] [--parent <folder-id>] [--account <email>]

Resolve scripts/ relative to this skill's directory.

Critical Rules

  1. Use gog docs update --format=markdown — never write --markdown, never create --file. The update path is the only one that correctly applies Google Docs heading styles via the API.
  2. Markdown must have proper # headings. If the source has "heading-looking" plain text without # markers, add them before conversion. The script warns but proceeds.
  3. Two-step process: create empty doc → populate with update. This is deterministic and reliable.
  4. Always verify heading syntax in the markdown before running. No # = no formatted headings in the output.

What Works

  • ####### headings → Google Docs Heading 1–6
  • bold → bold text
  • ` inline code ` → Courier New
  • Fenced code blocks → Courier New + gray background
  • > blockquotes → indented paragraphs
  • - bullets → bullet-prefixed text
  • 1. numbered → number-prefixed text
  • text → hyperlinks
  • Markdown tables → native Google Docs tables

Known Limitations

  • italic may not render (gog CLI bug in inline formatting parser — italic detection fails in certain contexts)
  • Bullet/numbered lists use text prefixes (, 1.), not native Google Docs list objects
  • Horizontal rules render as 40 dashes

Options

  • --title — Doc title. Defaults to filename with hyphens→spaces.
  • --parent — Google Drive folder ID to place the doc in.
  • --account — Google account email. Defaults to gog's default (first authenticated account).

Troubleshooting

  • All body text, no headings: The markdown file lacks # heading markers. Add them.
  • gog auth errors: Run gog auth list to verify auth. May need gog auth add .
  • Empty doc created: The update step failed. Check gog output for API errors.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-31 15:53 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Research

brennerspear
对主题进行开放式研究,构建可更新的 Markdown 文档,支持交互式与深度研究模式。
★ 0 📥 4,869
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,648
productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 445 📥 226,292