Convert Documents To Markdown

作者 firecrawl261fc257d17cMIT22K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库5周前更新

Convert Word (.doc, .docx), PowerPoint (.ppt, .pptx), Excel (.xls, .xlsx), OpenDocument (.odt, .ods, .odp), RTF, EPUB, CSV, and PDF files to GitHub-Flavored Markdown. Use when a task needs the contents of an office document, spreadsheet, presentation, ebook, or PDF you cannot read directly.

仅含说明Documents & Office
AI 生成的概览

使用 anydoc CLI 将办公文档、电子表格、演示文稿、电子书和 PDF 转换为 GitHub 风格 Markdown。

功能
该技能指导智能体运行 anydoc 命令行工具,把 Word、PowerPoint、Excel、OpenDocument、RTF、EPUB、CSV 和 PDF 文件转换为 GitHub 风格 Markdown。输出可打印到标准输出,也可用 -o 参数写入文件,输入还可通过标准输入并显式指定格式来读取。它说明了支持的文件扩展名、退出码,以及将扫描件或纯图片 PDF 页面发送到托管 OCR 服务的选项。
适用场景
当任务需要智能体无法直接读取的办公文档、电子表格、演示文稿、电子书或 PDF 的内容时使用。对于大型文档,也适合先把 Markdown 写入文件再按需分段读取。
运行要求
需要 Node 20 或更高版本,以及通过网络使用 npx 获取 anydoc 包;无需安装。对扫描件或纯图片 PDF 使用托管 OCR 时,需要访问 Firecrawl Parse 的网络连接,并可选通过 --api-key 或 FIRECRAWL_API_KEY 环境变量提供 API 密钥。该技能不附带脚本,仅为说明文档。

Convert documents to Markdown

Run the anydoc CLI. It needs Node 20+ and no install:

bash
npx -y @firecrawl/anydoc <file>              # Markdown to stdoutnpx -y @firecrawl/anydoc <file> -o out.md    # write to a filenpx -y @firecrawl/anydoc - --format csv < f  # read stdin

Rules:

  1. Supported inputs: .doc, .docx, .docm, .odt, .rtf, .epub, .pdf, .ppt, .pps, .pot, .pptx, .pptm, .ppsx, .ppsm, .odp, .xls, .xlsx, .xlsm, .xlsb, .ods, .csv.
  2. The format is detected from the file content. Pass --format <name> only when detection cannot work: CSV from stdin, or a missing or wrong extension.
  3. Exit codes: 0 success, 1 the document could not be converted, 2 usage error, 3 pages of a PDF need OCR. Failures print one anydoc: <message> line to stderr. The CLI never prompts.
  4. For a large document, write to a file with -o and read the parts you need instead of streaming everything into context.
  5. Scanned and image-only pages need OCR, which anydoc does not do, so the document exits 3. Rerun with --ocr hosted to send it to Firecrawl Parse. No signup needed. Pass --api-key or set FIRECRAWL_API_KEY for higher limits.
  6. Inside a Node, Python, or Rust codebase, prefer the library over shelling out: @firecrawl/anydoc on npm, firecrawl-anydoc on PyPI, anydoc on crates.io. Each exposes the same to_markdown / toMarkdown API.

来源与署名

来源:firecrawl/anydoc位于skills/convert-documents-to-markdown提交261fc25

许可证: MIT

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架