Skip to main content

ParseDoc

ParseDoc

PyPI version Python Versions License: MIT Code style: black

Document → AI → Markdown. A local-first CLI that converts documents into clean, structured, AI-ready Markdown.

ParseDoc turns PDFs, Word docs, PowerPoint decks, HTML pages, plain text, and images into well-structured Markdown. Libraries extract the raw facts, an optional AI model understands the structure, and a deterministic renderer produces the final output. It works fully offline (local rule-based structuring) and can optionally use an AI provider for smarter structuring.


Demo

Demo Video

Watch the demo on YouTube: https://youtu.be/Cz8ORg6Fs1Y


Screenshots / Proofs

Proof 1

Proof 2

Proof 3


Features

  • Local-first: conversion works with no AI provider configured (deterministic fallback).
  • Multi-format input: PDF, DOCX, PPTX, HTML, TXT/MD, and images (PNG/JPG) via OCR.
  • AI structuring (optional): local, ai, or hybrid modes.
  • Pluggable AI providers: OpenAI-compatible (vLLM/LM Studio/OpenRouter), OpenAI, Google Gemini, Ollama (native), and LM Studio.
  • Document fidelity: preserves headings, bold/italic/underline, hyperlinks, nested lists, and keeps tables in their original position.
  • Image extraction: parsedoc image pulls embedded images from a DOCX into a folder in your working directory (or a path you choose).
  • OCR: Tesseract-backed text extraction for scanned PDFs and images.
  • Multiple output formats: markdown (default), json, html, text.

Installation

pip install docpilot-ai

The PyPI package is named docpilot-ai; the import name and CLI command are both parsedoc.

Full setup, configuration, and provider instructions are in setup.md.


Quick start

# Convert a single document
parsedoc convert input.docx -o output.md --mode hybrid

# Convert a whole folder (creates ./batch_out in the current directory)
parsedoc batch . -p "*.docx"

# Inspect a document's structure
parsedoc inspect input.pdf --format summary

# Extract all images embedded in a DOCX into <filename>_assets/ (in the cwd)
parsedoc image input.docx

# Extract images into a specific folder
parsedoc image input.docx -o ./my_images

# Show configuration
parsedoc config list

# Banner + version
parsedoc version

Modes

Mode Behavior
local Pure rule-based structuring. No network calls. Fast and private.
ai Structures content using the configured AI provider.
hybrid Uses AI when available, falls back to local structuring on failure.

Supported input formats

Format Extensions
PDF .pdf
Word .docx
PowerPoint .pptx
HTML .html, .htm
Text / Markdown .txt, .md, .markdown
Images .png, .jpg, .jpeg (OCR)

Configuring your API

ParseDoc supports several AI providers. Configure via parsedoc config, environment variables, or the TOML file. Examples:

# OpenAI-compatible (e.g. xkiro)
parsedoc config set --key ai_provider --value openai-compatible
parsedoc config set --key base_url --value "https://api.xkiro.com/v1"
parsedoc config set --key model --value "stealth/ox-alpha-free"
parsedoc config set --key api_key --value "sk-xt-..."

# LM Studio (local, defaults to http://localhost:1234/v1)
parsedoc config set --key ai_provider --value lm-studio
parsedoc config set --key model --value local-model

# Ollama (local)
parsedoc config set --key ai_provider --value ollama
parsedoc config set --key model --value qwen3

See setup.md for the complete list of providers (openai-compatible, openai, gemini, ollama, lm-studio), all config keys, environment-variable overrides, and troubleshooting.


Using ParseDoc as a library

from parsedoc.core.config import Config
from parsedoc.core.pipeline import Pipeline

config = Config().load_from_file()
pipeline = Pipeline(config)

markdown = pipeline.process(
    "report.docx",
    output_format="markdown",
    mode="hybrid",
    extract_images=True,
    output_path="report.md",
)

Contributing

Contributions are welcome! See CONTRIBUTING.md for the development setup, how to add new parsers/AI providers, and the roadmap for future integrations such as the MCP SDK (exposing ParseDoc as a tool for LLM agents).

License

MIT — see LICENSE.

Download files

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

Source Distribution

docpilot_ai-0.2.10.tar.gz (5.4 MB view details)

Uploaded Source

Built Distribution

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

docpilot_ai-0.2.10-py3-none-any.whl (5.4 MB view details)

Uploaded Python 3

File details

Details for the file docpilot_ai-0.2.10.tar.gz.

File metadata

  • Download URL: docpilot_ai-0.2.10.tar.gz
  • Upload date:
  • Size: 5.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.0

File hashes

Hashes for docpilot_ai-0.2.10.tar.gz
Algorithm Hash digest
SHA256 390674e7bb4e0b233fe3de874db9f3f964200934a3c60bd7dacb6ca60f1670b3
MD5 6142507c61036a86c1a2743ae898d139
BLAKE2b-256 1093635e0eb301fed1b0d12dbed2bda7fc0c9aeafb688915a12498f7c5479379

See more details on using hashes here.

File details

Details for the file docpilot_ai-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: docpilot_ai-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.0

File hashes

Hashes for docpilot_ai-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6b53c95f49e09e040f953bf1202afa102d3edbc6a64689af5285ea227a9c0f26
MD5 1dff2cf7a4bf28b595b188e9de7b416f
BLAKE2b-256 7c89eaf7f4f7da2fd3e0978245533bde2f672384f84c45013848c9394c5eb774

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.13

2 files

0.2.12

2 files

0.2.11

2 files

This release

0.2.10 This release

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

Supported by

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