bruc3van

Bruce Doc Converter — Documentation skill for Claude Code

Documentation community

为 Claude Code / OpenClaw 添加双向文档转换能力.

How to install Bruce Doc Converter

This entry records only its repository, not the path inside it, so there is no exact command to give. Open bruc3van/bruce-doc-converter and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Bruce Doc Converter does

为 Claude Code / OpenClaw 添加双向文档转换能力。支持 Word/Excel/PPT/PDF ↔ Markdown,导出精美 Word 文档。

Alternatives in Documentation

  • Docx — Create, edit, and analyze Word documents with tracked changes, comments, and formatting 94.1k ★
  • Translate Doc Zh — Translate English documentation to Chinese 5.7k ★
  • Ars Format Convert — ARS academic-paper format-convert mode — convert to LaTeX / DOCX / PDF / Markdown 4.5k ★

README

Bruce Doc Converter

为 Claude Code / OpenClaw 添加双向文档转换能力

[![Agent Skill](https://img.shields.io/badge/Agent_Skill-Skill-purple.svg)](https://github.com/anthropics/claude-code) [![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)](https://www.python.org/downloads/) [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

**Bruce Doc Converter** 是一个面向 Agent 的文档转换 CLI,为 **Claude Code / OpenClaw** 添加**双向文档转换**能力:

  • Office/PDF → Markdown:将 Word、Excel、PowerPoint、PDF 转换为 AI 友好的 Markdown 格式
  • Markdown → Word:将 Markdown 导出为排版精美的 Word 文档,自动渲染 Mermaid 图表

安装

首先检查 `bdc` 是否已安装:

command -v bdc        # macOS / Linux
where bdc             # Windows

若未安装,依次尝试以下方式(成功即止):

# 1. pipx(首选,独立环境,bdc 直接可用)
pipx install bruce-doc-converter

# 2. uv(快速、独立,bdc 直接可用)
uv tool install bruce-doc-converter

# 3. pip --user(最通用,bdc 直接可用)
pip3 install --user bruce-doc-converter   # macOS/Linux
pip install --user bruce-doc-converter    # Windows
# 或通用写法:python3 -m pip install --user bruce-doc-converter(Windows 用 `python`)

# 4. venv 兜底(处处可用,但 bdc 不在 PATH 中)
python3 -m venv .venv
.venv/bin/pip install bruce-doc-converter
# Windows: .venv\Scripts\pip install bruce-doc-converter

**venv 提示**:使用 venv 方式安装后,下文所有 `bdc` 命令需替换为 `.venv/bin/bdc`(macOS/Linux)或 `.venv\Scripts\bdc`(Windows)。

**Windows 提示**:若 `python3` 未识别,改用 `python`。

Agent CLI 用法

bdc convert /path/to/document.docx
bdc convert /path/to/notes.md
bdc convert /path/to/notes.md --mermaid-scale 4
bdc batch /path/to/documents

CLI 默认向 stdout 输出 JSON,stderr 仅用于进度日志。

内容完整性与批量结果

# 有内容缺失或降级警告时返回失败,不生成该文件的转换结果
bdc convert budget.xlsx --strict
# 仅返回前 4000 个字符;完整正文仍保存在输出文件中
bdc convert report.docx --content preview --preview-chars 4000
# 不将正文装入 JSON;完整逐文件明细写入独立 JSONL 清单
bdc batch ./documents --content none --manifest auto --max-results 200
# 每完成一个文件即输出一行 JSON,最后输出汇总
bdc batch ./documents --content none --jsonl --manifest ./results.jsonl

`--content`