Metadata-Version: 2.4
Name: pdf-to-markdown-cli
Version: 0.5.1
Summary: CLI tool to convert PDF files (and other documents) to markdown using the Marker API.
Author: Nikita Sokolsky
License: MIT License
        
        Copyright (c) 2025 SokolskyNikita
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/SokolskyNikita/pdf-to-markdown-cli
Project-URL: Bug Tracker, https://github.com/SokolskyNikita/pdf-to-markdown-cli/issues
Keywords: pdf,markdown,converter,cli,document,marker,md
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: backoff>=2.0
Requires-Dist: diskcache>=5.0
Requires-Dist: filetype>=1.0
Requires-Dist: pikepdf>=8.0
Requires-Dist: pydantic>=2.0
Requires-Dist: ratelimit>=2.0
Requires-Dist: requests>=2.0
Requires-Dist: tqdm>=4.0
Provides-Extra: test
Dynamic: license-file

# PDF to Markdown CLI

Convert PDFs and other documents to Markdown using the [Marker API](https://www.datalab.to/marker).

## Features

- Convert PDFs, Word docs, PowerPoint, spreadsheets, EPUB, HTML, and images to Markdown/JSON/HTML
- Automatic chunking for large documents with parallel processing
- Progress tracking and local caching for interrupted runs
- Full OCR customization options

## Installation

### From PyPI

```bash
pip install pdf-to-markdown-cli
```

### From source

```bash
git clone https://github.com/SokolskyNikita/pdf-to-markdown-cli.git 
cd pdf-to-markdown-cli
pip install -e .
```

## Usage

```bash
# Get API key from https://www.datalab.to/marker
export MARKER_PDF_KEY=your_api_key_here

# Basic usage
pdf-to-md /path/to/file.pdf

# Common options
pdf-to-md /path/to/file.pdf --json          # JSON output
pdf-to-md /path/to/file.pdf --noimg         # Disable images  
pdf-to-md /path/to/file.pdf --max           # Enable all flags for maximum output quality
```

## CLI Options

- `input`: Input file or directory path
- `--json`: Output in JSON format (default is markdown)
- `--langs`: Comma-separated OCR languages (default: "English")
- `--llm`: Use LLM for enhanced processing
- `--strip`: Redo OCR processing
- `--noimg`: Disable image extraction
- `--force`: Force OCR on all pages
- `--pages`: Add page delimiters
- `--max`: Enable all OCR enhancements (equivalent to --llm --strip --force)
- `-mp`, `--max-pages`: Maximum number of pages to process from the start of the file
- `--no-chunk`: Disable PDF chunking
- `-cs`, `--chunk-size`: Set PDF chunk size in pages (default: 25)
- `-o`, `--output-dir`: Absolute path to the output directory
- `-v`, `--verbose`: Enable verbose (DEBUG level) logging
- `--version`: Show the installed version and exit

## Requirements

- Python ≥3.10
- API key from [datalab.to](https://www.datalab.to/marker)
