Skip to main content

LiteDoc in your terminal: deterministic PDF → Markdown with an optional bring-your-own-AI repair pass. Same engine as litedoc.xyz.

Project description

litedoc-cli

The litedoc.xyz extraction engine in your terminal: deterministic PDF → Markdown that never hallucinates, with an optional, triage-first AI repair pass you can point at your own model.

pip install litedoc-cli
playwright install chromium        # one-time engine download

litedoc convert paper.pdf                  # markdown to stdout
litedoc convert scans/*.pdf -o out/ --ocr
litedoc convert paper.pdf -o out/ --images out/images   # extracted figures as JPEGs
litedoc convert scan.pdf --ai-url http://localhost:11434 --ai-model llama3.1:8b
  • Identical output to the web app — it drives the same single-file engine headlessly.
  • Deterministic by default — no AI flag, no network: nothing leaves your machine.
  • Bring your own AI--ai-url speaks Ollama or OpenAI-compatible protocols; only sections that are provably damaged (broken sentences, ragged tables, OCR artifacts) are ever sent. --ai uses the hosted LiteDoc service instead (token from LITEDOC_TOKEN; only damaged sections are billed).
  • Scriptable — globs, stdin (-), stdout piping, --json envelopes, real exit codes.
  • Structure, not just prose--json returns per-page layout (lines with coordinates, font sizes, reading-order blocks, OCR provenance; tables as row arrays; figures with page + bounding box), and --images DIR writes detected figures — cropped to include their axis labels and annotations — as JPEG files linked from the markdown.

License: AGPL-3.0. Part of the LiteDoc project.

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

litedoc_cli-3.1.1.tar.gz (1.0 MB view details)

Uploaded Source

Built Distribution

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

litedoc_cli-3.1.1-py3-none-any.whl (1.0 MB view details)

Uploaded Python 3

File details

Details for the file litedoc_cli-3.1.1.tar.gz.

File metadata

  • Download URL: litedoc_cli-3.1.1.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for litedoc_cli-3.1.1.tar.gz
Algorithm Hash digest
SHA256 745dbaab6fd5e0ae8992ce27d3f6445f86b657f727a899144e2a4e4281bdc5bd
MD5 51d8f52b64eb39cd176894ca93cc8521
BLAKE2b-256 80196073bfb8e301c69808095b08267e2a9492376586bdc9c3538a6ab2f21d85

See more details on using hashes here.

Provenance

The following attestation bundles were made for litedoc_cli-3.1.1.tar.gz:

Publisher: publish.yml on 0xovo/LiteDoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file litedoc_cli-3.1.1-py3-none-any.whl.

File metadata

  • Download URL: litedoc_cli-3.1.1-py3-none-any.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for litedoc_cli-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ef5164712b8dd59da35b4e8618f210325756799a58744f5b94f6af7a4ecefa8
MD5 3b5f635c32c49a109ca244c8dc899c7c
BLAKE2b-256 b3d778ed0ea09cb16e26b1ec867b2535aabc012356ca769221ad68da81721bb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for litedoc_cli-3.1.1-py3-none-any.whl:

Publisher: publish.yml on 0xovo/LiteDoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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