技能 效率工具 多格式文档转 Markdown

多格式文档转 Markdown

v20261126
convert-documents-to-markdown
anydoc 命令行工具可将 Word、PowerPoint、Excel、PDF 及 CSV 等多种格式文档转换为 GitHub 风格的 Markdown。支持从文件或标准输入读取,输出至标准输出或指定文件。适用于提取无法直接阅读的办公文档、电子表格和电子书内容,自动检测格式或手动指定。
获取技能
396 次下载
概览

Convert documents to Markdown

The anydoc CLI is pre-installed in the sandbox. It converts one document per
invocation and writes GitHub-Flavored Markdown to stdout. It never prompts;
diagnostics go to stderr.

Usage

anydoc report.docx                  # Markdown to stdout
anydoc slides.pptx -o slides.md     # write to a file
anydoc - --format csv < data.csv    # read stdin (stdin needs --format for CSV)

Supported inputs: Word (.doc, .docx, .docm), PowerPoint (.ppt, .pptx, .ppsx),
Excel (.xls, .xlsx, .xlsb), OpenDocument (.odt, .ods, .odp), RTF, EPUB, CSV,
and PDF. The format is detected from file content; pass --format <name> when
detection fails (stdin CSV, missing extensions).

Exit codes: 0 success, 1 the document could not be read or converted,
2 usage error.

Guidelines

  • For a large document, write to a file with -o and read the parts you need

instead of streaming the whole conversion into context.

  • Scanned or image-only PDFs need OCR, which anydoc does not do — they exit 1.

Use the OCR path in skills/pdf/SKILL.md (pytesseract + pdf2image).

  • anydoc is read-only extraction. To create or edit files, use the format's own

skill: skills/docx, skills/xlsx, skills/presentations, skills/pdf.

  • For layout-aware PDF extraction (tables with coordinates, per-page bounding

boxes), use pdfplumber from skills/pdf/SKILL.md.

信息
分类 效率工具
名称 convert-documents-to-markdown
版本 v20261126
大小 1.81KB
更新时间 2026-11-26
语言