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.0.tar.gz (9.1 kB 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.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: litedoc_cli-3.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • 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.0.tar.gz
Algorithm Hash digest
SHA256 af3d0480ecdd3456c0e8d78ccb5eb588bcf277958e4f0425fbef9c4faacf6943
MD5 426b38f90f41268d5abae2b87907de3c
BLAKE2b-256 d156789ae90e4f7f6ec1c2466bc194cb6b161846f41098eeecaf1a83694dcdb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for litedoc_cli-3.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: litedoc_cli-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a6d042620a7e1b8aafae3ffd5429bae1022cc4cf3b7f39e472623fa071f79b7
MD5 d24960ec6f0a0d2e646fc02aa6c3d033
BLAKE2b-256 486c3f6467dce8537225e479151104e9f1bf2ae0087602062fb5e59a60e5f761

See more details on using hashes here.

Provenance

The following attestation bundles were made for litedoc_cli-3.1.0-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