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

Your browser does not support the video tag. You can download the demo here.

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, lists, and keeps tables in their original position.
  • Image extraction: pull embedded images from DOCX into an assets folder.
  • 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

# 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",
)

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.9.tar.gz (5.3 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.9-py3-none-any.whl (5.3 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: docpilot_ai-0.2.9.tar.gz
  • Upload date:
  • Size: 5.3 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.9.tar.gz
Algorithm Hash digest
SHA256 8f4a3ac4c6ded01829339bd50e9899b33a2e39101afe34ed5599dbbf3e2d290b
MD5 21b44bec255b5f65135dd75e281bbb19
BLAKE2b-256 24aca473d1ea467ac101dfebb5ee65dbdfa78244bfe3be0a9a22041f856078a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: docpilot_ai-0.2.9-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 675e3d1040e902c433fb1bc836a2d11132229f1d3fbd7870e6cc8a4beab3d6d7
MD5 eef7bf0c89617e9ff7ab77c4eabd1b3f
BLAKE2b-256 15a34ae11aa8bd619cdcb3cd36cf3c9df8b186a561d3b38dbf7eda8569743758

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

0.2.10

2 files

This release

0.2.9 This release

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