pdf2wiki
Convert heavily technical books (native-text PDFs) into clean, chapter-split, LLM-ready Markdown. Code stays byte-perfect, tables stay intact, and diagrams are transcribed to Mermaid. The output suits an Obsidian vault or any Markdown-native knowledge base.
Built on MinerU with a dual-pass strategy. A pipeline pass
(-m txt) takes byte-perfect code and text from the PDF's embedded text layer. A hybrid/VLM pass
(--effort high) reconstructs table grids and transcribes diagrams to Mermaid. A base-driven merge then
grafts the good parts together, and token-verifies the code so that a VLM which hallucinates never
corrupts a listing. A six-step post-processing chain cleans the result and splits it into per-chapter files.
Why two backends instead of one: why a dual-backend pipeline.
Requirements
- Linux (native or WSL2) with an NVIDIA GPU, ≥ 8 GB VRAM, CUDA driver installed
- Python ≥ 3.11
- MinerU ≥ 3.4 on
PATH - A C compiler for vLLM's Triton JIT:
sudo apt install build-essential python3-dev
Only the conversion needs the GPU — phase5, qa, and scan run anywhere Python runs. No GPU at all?
offload the hybrid pass to a server, which keeps the
pipeline pass local on CPU. Or use a remote GPU. Or, with no local
setup at all, convert in the cloud via the managed mineru.net
API.
Install
uv tool install pdf2wiki # or: pip install pdf2wiki
Full steps: install pdf2wiki. The install includes every converter, cloud included — no separate extra.
Quickstart
# 1. convert one book -> out/my-book/my-book.md + images/ + blocks.json
pdf2wiki convert book.pdf --name my-book
# 2. preview the cleanup + chapter split (dry-run)
pdf2wiki phase5 out/my-book/my-book.md --book my-book
# 3. apply it -> out/my-book/chapters/00-front-matter.md, 01-….md, …
pdf2wiki phase5 out/my-book/my-book.md --book my-book --source-name book.pdf --apply
New here? Follow the guided tutorial: convert your first book.
Query the vault: the llm-wiki plugin
pdf2wiki builds a knowledge vault. The bundled llm-wiki Claude Code plugin reads one. Claude
can consult it while you plan, and review your code against it. It always cites the exact
[[Page-Name]]. It's the "LLM Wiki" pattern (an alternative to RAG/embeddings): plain Markdown read
just-in-time, with coverage discovered from the vault itself. Standalone (works with any vault in the
shape pdf2wiki produces) and MIT-licensed.
claude plugin marketplace add https://github.com/Sevthered/pdf2wiki
claude plugin install llm-wiki@pdf2wiki
The query side (consult + review) ships now. The ingest side is a later release. Details:
plugin/ · llm-wiki documentation.
Documentation
Full docs live in docs/, organized by intent (Diátaxis):
- Tutorials — convert your first book
- How-to — convert · post-process & split · batch · QA · remote GPU · offload hybrid to a server · convert in the cloud · troubleshoot
- Reference — CLI · configuration · pipeline stages · phase 5 steps · output layout
- Explanation — why dual-backend · how the merge works · design principles
- Architecture — overview with C4 diagrams
- Decisions — ADR log (MADR): why two backends, code token-verification, AGPL/MIT + subprocess, the executor port, remote hardening
- Plugin — llm-wiki (query/review a vault)
Contributing
Contributions are welcome — see CONTRIBUTING.md for setup and conventions, GOVERNANCE.md for how the project is run and who maintains it, and the Code of Conduct. Where the project is headed: the roadmap.
Reporting bugs. Found a defect or have a feature request? Open a GitHub issue — the bug-report template prompts for the version, environment, steps to reproduce, and expected vs actual behavior. Security issues must be reported privately per SECURITY.md, never as a public issue.
Repository scope. pdf2wiki is a single repository with no separate subprojects or additional
repositories. The bundled llm-wiki Claude Code plugin ships in-repo under plugin/.
Status
Alpha. All stages are functional. The converter was ported from a production deployment validated on several full technical books. The coverage gate hard-stops on a gap rather than a silent loss.
Remote (SSH) and cloud (--mineru-cloud) modes each have a verified end-to-end run on a real
GPU box. Those runs were a single-book conversion over SSH, and a cloud dual-pass merge. Neither mode
has been exercised at full-book batch scale yet, so prefer local mode for large runs.
License
AGPL-3.0-or-later for the converter. This tool drives the MinerU CLI (AGPL-3.0) as an external process.
The bundled plugin/ (the llm-wiki Claude Code plugin) is MIT-licensed.
See plugin/LICENSE.
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 pdf2wiki-0.2.9.tar.gz.
File metadata
- Download URL: pdf2wiki-0.2.9.tar.gz
- Upload date:
- Size: 254.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0816516ce3bb79f12a41b4e1da64c02a6cf6d3049292fe3993dcf6c10ba9264
|
|
| MD5 |
45118ed8eaba1367562c684a74f8515c
|
|
| BLAKE2b-256 |
9fd3e7507b2d4267f797f27b1883c6e92b6bceaa5eaaf68a695c1341f730c5ec
|
Provenance
The following attestation bundles were made for pdf2wiki-0.2.9.tar.gz:
Publisher:
publish.yml on Sevthered/pdf2wiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdf2wiki-0.2.9.tar.gz -
Subject digest:
b0816516ce3bb79f12a41b4e1da64c02a6cf6d3049292fe3993dcf6c10ba9264 - Sigstore transparency entry: 2548282968
- Sigstore integration time:
-
Permalink:
Sevthered/pdf2wiki@1e686887e914741b0ea4ef49a452b18d4f42cf39 -
Branch / Tag:
refs/tags/v0.2.9 - Owner: https://github.com/Sevthered
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e686887e914741b0ea4ef49a452b18d4f42cf39 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pdf2wiki-0.2.9-py3-none-any.whl.
File metadata
- Download URL: pdf2wiki-0.2.9-py3-none-any.whl
- Upload date:
- Size: 100.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45c63cdb20ed0d7a40c3d32cfe419b3b17a2332189b32b4553f3e32e5be424db
|
|
| MD5 |
5ef1edd0d38e0659a61939b88a9cc28a
|
|
| BLAKE2b-256 |
44ed51c8ad070df0cacc095b47f9499f3f34848089288ca3186af7009c148963
|
Provenance
The following attestation bundles were made for pdf2wiki-0.2.9-py3-none-any.whl:
Publisher:
publish.yml on Sevthered/pdf2wiki
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdf2wiki-0.2.9-py3-none-any.whl -
Subject digest:
45c63cdb20ed0d7a40c3d32cfe419b3b17a2332189b32b4553f3e32e5be424db - Sigstore transparency entry: 2548283035
- Sigstore integration time:
-
Permalink:
Sevthered/pdf2wiki@1e686887e914741b0ea4ef49a452b18d4f42cf39 -
Branch / Tag:
refs/tags/v0.2.9 - Owner: https://github.com/Sevthered
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e686887e914741b0ea4ef49a452b18d4f42cf39 -
Trigger Event:
release
-
Statement type: