mcpField
C
convert-documents-to-markdown

convert-documents-to-markdown

github.com/firecrawlDocuments23.2k12.7k installsUpdated 5d ago
Repository

About convert-documents-to-markdown

Convert documents to Markdown is a skill for using the anydoc CLI to convert a range of document formats. It covers format detection, output options, OCR limitations, and library APIs for codebases.

Key features

  1. 01Convert office documents, PDFs, EPUB, and CSV
  2. 02Write output to stdout or a file
  3. 03Read content from stdin
  4. 04Detect input formats automatically
  5. 05Offer hosted OCR for scanned pages
  6. 06Provide Node, Python, and Rust library APIs

Use cases

  1. 01Convert documents to Markdown for further processing
  2. 02Write large conversion results to a file
  3. 03Read piped CSV with an explicit format
  4. 04Use a library instead of the CLI in a codebase

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/firecrawl/anydoc --skill convert-documents-to-markdown

After installing, type/convert-documents-to-markdownin Claude Code to confirm it loaded.

Details

From the project README

Convert documents to Markdown

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

npx -y @firecrawl/anydoc <file>              # Markdown to stdout
npx -y @firecrawl/anydoc <file> -o out.md    # write to a file
npx -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.

Comments

Markdown supported