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-urlspeaks Ollama or OpenAI-compatible protocols; only sections that are provably damaged (broken sentences, ragged tables, OCR artifacts) are ever sent.--aiuses the hosted LiteDoc service instead (token fromLITEDOC_TOKEN; only damaged sections are billed). - Scriptable — globs, stdin (
-), stdout piping,--jsonenvelopes, real exit codes. - Structure, not just prose —
--jsonreturns per-page layout (lines with coordinates, font sizes, reading-order blocks, OCR provenance; tables as row arrays; figures with page + bounding box), and--images DIRwrites 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af3d0480ecdd3456c0e8d78ccb5eb588bcf277958e4f0425fbef9c4faacf6943
|
|
| MD5 |
426b38f90f41268d5abae2b87907de3c
|
|
| BLAKE2b-256 |
d156789ae90e4f7f6ec1c2466bc194cb6b161846f41098eeecaf1a83694dcdb6
|
Provenance
The following attestation bundles were made for litedoc_cli-3.1.0.tar.gz:
Publisher:
publish.yml on 0xovo/LiteDoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litedoc_cli-3.1.0.tar.gz -
Subject digest:
af3d0480ecdd3456c0e8d78ccb5eb588bcf277958e4f0425fbef9c4faacf6943 - Sigstore transparency entry: 2207485710
- Sigstore integration time:
-
Permalink:
0xovo/LiteDoc@e640566ef05d7799fc7fea67a96c36deaa27c44e -
Branch / Tag:
refs/tags/v3.1.0 - Owner: https://github.com/0xovo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e640566ef05d7799fc7fea67a96c36deaa27c44e -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a6d042620a7e1b8aafae3ffd5429bae1022cc4cf3b7f39e472623fa071f79b7
|
|
| MD5 |
d24960ec6f0a0d2e646fc02aa6c3d033
|
|
| BLAKE2b-256 |
486c3f6467dce8537225e479151104e9f1bf2ae0087602062fb5e59a60e5f761
|
Provenance
The following attestation bundles were made for litedoc_cli-3.1.0-py3-none-any.whl:
Publisher:
publish.yml on 0xovo/LiteDoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litedoc_cli-3.1.0-py3-none-any.whl -
Subject digest:
8a6d042620a7e1b8aafae3ffd5429bae1022cc4cf3b7f39e472623fa071f79b7 - Sigstore transparency entry: 2207485785
- Sigstore integration time:
-
Permalink:
0xovo/LiteDoc@e640566ef05d7799fc7fea67a96c36deaa27c44e -
Branch / Tag:
refs/tags/v3.1.0 - Owner: https://github.com/0xovo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e640566ef05d7799fc7fea67a96c36deaa27c44e -
Trigger Event:
release
-
Statement type: