Metadata-Version: 2.4
Name: pdf2md-uv
Version: 0.1.0
Summary: Fast local PDF to Markdown converter — powered by pymupdf4llm & uv
Project-URL: Homepage, https://github.com/cncsmonster/pdf2md-uv
Project-URL: Repository, https://github.com/cncsmonster/pdf2md-uv
Author: cncsmonster
License: AGPL-3.0-only
License-File: LICENSE
Keywords: llm,markdown,ocr,pdf,rag,uv
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Markup :: Markdown
Classifier: Topic :: Utilities
Requires-Python: >=3.12
Requires-Dist: pymupdf4llm
Description-Content-Type: text/markdown

# pdf2md-uv

> Fast local PDF to Markdown converter — powered by [pymupdf4llm](https://github.com/pymupdf/pymupdf4llm) and distributed via [uv](https://github.com/astral-sh/uv).

```bash
pdf2md paper.pdf          → paper.md
pdf2md slides/            → convert all PDFs in directory
```

## Why pdf2md-uv?

There are many tools named `pdf2md`, but most are:
- ❌ Browser-based apps (no CLI)
- ❌ Cloud APIs (data privacy risk)
- ❌ Heavy ML models (need GPU)

**pdf2md-uv is different:**
- ✅ **Modern**: Packaged with `uv` — the new standard for Python tooling
- ✅ **Fast**: Seconds for typical documents
- ✅ **Private**: 100% local, no cloud API calls
- ✅ **Smart**: Auto-detects scanned pages and uses built-in RapidOCR

## Install

Requires [uv](https://docs.astral.sh/uv/):

```bash
uv tool install pdf2md-uv
```

That's it. No `pip install`, no virtualenv setup, no dependency conflicts.

## Usage

```bash
# Single file
pdf2md input.pdf

# Custom output path
pdf2md input.pdf -o custom.md

# Batch convert directory
pdf2md papers/

# Quiet mode (for scripting)
pdf2md input.pdf -q
```

## How it works

pdf2md-uv wraps [pymupdf4llm](https://github.com/pymupdf/pymupdf4llm) to provide a zero-config CLI:

1. **Text-based PDFs**: Direct text extraction (100% accurate)
2. **Scanned PDFs**: Automatic OCR using [RapidOCR](https://github.com/RapidAI/RapidOCR) (PP-OCRv4 model)

Everything runs locally on your CPU.

## Comparison

| Tool | Tech | Offline? | Notes |
|------|------|----------|-------|
| **pdf2md-uv** (this) | pymupdf4llm + RapidOCR | ✅ | Fast, local, uv-packaged |
| mrmps/pdf2md | Next.js browser app | ✅ | Frontend only |
| link2004/pdf2md | Mistral AI API | ❌ | Cloud dependency |
| mathinml/pdf2md | Qwen2.5-VL (3B) | ✅ | Needs GPU |

## License

MIT
