在命令行中将 Markdown 转换为 DOCX、PDF、PPTX、XLSX、JSON 等多种格式。
文档
anydoc
试用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.
它能做什么
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.
技能文档
Convert documents to Markdown
Run the anydoc CLI and write Markdown to stdout or a file:
anydoc # Markdown to stdout
anydoc -o out.md # write to a file
anydoc - --format csv < f # read stdin
First-time install
If command -v anydoc fails, install the PATH-first wrapper used on this workstation:
mkdir -p ~/.local/bin
cat > ~/.local/bin/anydoc <<'EOF'
#!/usr/bin/env bash
set -euo pipefail
exec bunx @firecrawl/anydoc@latest "$@"
EOF
chmod +x ~/.local/bin/anydoc
Requirements and checks:
- Keep
~/.local/binonPATHahead of later package-manager bin dirs. - Requires Bun so
bunxcan fetch@firecrawl/anydoc@latest. - Verify with
command -v anydocandanydoc -V. - Prefer this wrapper over a permanent Bun/npm global install of
@firecrawl/anydoc.
Rules
- Supported inputs:
.doc,.docx,.docm,.odt,.rtf,.epub,.pdf,.ppt,.pps,.pot,.pptx,.pptm,.ppsx,.ppsm,.odp,.xls,.xlsx,.xlsm,.xlsb,.ods,.csv. - The format is detected from the file content. Pass
--formatonly when detection cannot work: CSV from stdin, or a missing or wrong extension. - Exit codes: 0 success, 1 the document could not be converted, 2 usage error. Failures print one
anydoc:line to stderr. The CLI never prompts. - For a large document, write to a file with
-oand read the parts you need instead of streaming everything into context. - Scanned and image-only PDFs need OCR, which anydoc does not do; they fail as unsupported. The hosted Firecrawl Parse API handles those.
- Inside a Node, Python, or Rust codebase, prefer the library over shelling out:
@firecrawl/anydocon npm,firecrawl-anydocon PyPI,anydocon crates.io. Each exposes the sameto_markdown/toMarkdownAPI.
相关技能
Converts PDF, DOCX, XLSX, PPTX, HTML, CSV, and other files to Markdown using the @covoyage/file2md CLI (@covoyage/file2md). Use when the user needs office do...
将受支持的文档转为 Markdown,方便智能代理读取,并在源文件旁保存单个文件或转换包。
将 PDF 和图片转换为 10 种文档或数据格式,并提供 OCR 与版面分析控制。
See: https://github.com/anyforge/anyparse Use the AnyParse API to extract content from various documents. Supports PDF, Word, Excel, CSV, TSV, images, PPT, HTML, Markdown, Epub, ipynb, RST, EML, and many other formats. Supports document orientation classification, layout analysis, and layout preservation.
Convert a Markdown file or raw Markdown string into a polished Word DOCX document. Supports custom Word template files, includes built-in DOCX templates, and...