Skip to main content

CLI for RapidAI/RapidDoc — parse PDF/Office documents to Markdown/JSON/Word/HTML

Project description

rapiddoc-cli

A command-line interface for RapidAI/RapidDoc — parse PDF / image / Office documents into Markdown / JSON / Word / HTML with a single command.

RapidDoc is a high-performance document parsing pipeline (MinerU fork, VLM removed, ONNX-based) that runs on CPU — no GPU required.

Install

# Recommended: isolated environment (doesn't pollute your system Python)
uv tool install rapiddoc-cli

# Or with pip
pip install rapiddoc-cli

Both expose the rapiddoc command. The first run downloads ONNX models (~50–100 MB) to a cache directory; subsequent runs reuse them.

Usage

rapiddoc paper.pdf                      # → paper.out.md (default: Markdown)
rapiddoc report.pdf -f json             # → report.out.json
rapiddoc notes.docx -f word             # → notes.out.docx (Office native parsing)
rapiddoc scan.png -f html               # → scan.out.html
rapiddoc book.pdf -o book.md --lang en  # English OCR + custom output path
rapiddoc scan.png --no-formula          # skip formula recognition (faster)

Options

rapiddoc <input> [options]

  -o, --output <path>               Output file path
  -f, --format <md|json|word|html>  Output format (default: md)
      --lang <ch|en|...>            OCR language (default: ch)
      --no-formula                  Disable formula recognition
      --no-table                    Disable table recognition
  -h, --help                        Show help

Supported inputs

Type Formats How it's parsed
PDF .pdf Model pipeline (OCR + layout + formula + table)
Images .png .jpg .jpeg .bmp .tiff Model pipeline
Office .docx .pptx .xlsx Native parsing (no models, very fast)
Legacy Office .doc .ppt .xls Converted to modern format first

Platform notes

  • macOS / Apple Silicon: works out of the box. RapidDoc auto-detects the CPU and falls back to ONNX Runtime (OpenVINO is skipped automatically — no configuration needed).
  • Linux x86: OpenVINO is used for OCR (fastest on CPU); other stages use ONNX Runtime.
  • No GPU required: the whole pipeline runs on CPU. There is no CUDA/MPS path.

How it works

rapiddoc-cli is a thin wrapper around the rapid-doc Python package. It:

  1. Initializes a RapidDoc engine (OCR, layout, formula, table models loaded on demand)
  2. Parses the input into an intermediate middle_json representation
  3. Renders the requested output format:
    • Markdown / JSON: produced directly by the engine
    • Word / HTML: Markdown is generated first, then converted via markdown_to_docx / markdown_to_html (pypandoc / markdown-it-py)

License

Apache-2.0 (same as upstream rapid-doc).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rapiddoc_cli-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rapiddoc_cli-0.1.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file rapiddoc_cli-0.1.0.tar.gz.

File metadata

  • Download URL: rapiddoc_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rapiddoc_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9707bb5efacae8c717206464c1efcda020e804e151a3124306bcb0c877b05686
MD5 7dee59a719dcd8dba6ddd1406be53a8b
BLAKE2b-256 1f22c7487ff564a361a75d1257e6025158a3e3a8146122d07f739be57ac09a7f

See more details on using hashes here.

File details

Details for the file rapiddoc_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rapiddoc_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for rapiddoc_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c041e7150b67b147e81712602a51767a8320855b8ff8c6f17de30ca517e56dff
MD5 4f8bed5f90f714a257745dae4d649ed4
BLAKE2b-256 5e8ca35fc64eb61354604548a18d9067188dfbc4f9bc860b7e950419e42a3313

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page