Convert Documents To Markdown

firecrawl/anydoc/skills/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 從公開儲存庫中收錄這些內容。

檢舉或申請下架