Skip to main content

chesspdf

Convert chess puzzle books you own — PDF in, replay-verified PGN out.

Point it at a chess book PDF and get four PGN files: a spoiler-free problems file (one position per puzzle, with the book's hint as a comment), a solutions file, and verified/review splits. Works on both born-digital PDFs (boards typeset in a chess font — decoded deterministically, zero API calls) and scanned books (vision recognition via the Gemini API).

Why trust the output

Vision models misread chess diagrams too often to trust. chesspdf never does: a position is accepted only when the book's own printed solution replays legally from it (python-chess). Failures go through deterministic repair passes; the small residue lands in a human review web app instead of silently shipping wrong. Every puzzle carries a ledger of how its data was obtained and verified.

Measured across three complete books (2,266 puzzles): born-digital books verify at ~100% with zero API calls; scanned books reach ~90% machine-verified before any human review.

Install

uv tool install chesspdf        # or: pipx install chesspdf
export GEMINI_API_KEY=...       # only needed for scanned books

Quickstart

# 1. What kind of book is this?
chesspdf probe probe mybook.pdf                 # JSON: born-digital or scanned,
                                                # fonts, candidate puzzle pages

# 2. Render a few pages and look at the layout
chesspdf probe render mybook.pdf ./pages 10 11 300

# 3. Run the pipeline for your book folder (see docs/DEVELOPMENT.md)
chesspdf --book books/mybook audit              # replay-verify everything
chesspdf --book books/mybook fix-fens           # repair failing positions
chesspdf --book books/mybook fix-moves          # repair broken solutions
chesspdf --book books/mybook review             # human review web app

Or let an agent do it

The plugin/ directory packages this workflow as an agent skill (onboard-book) for Claude Code, Codex CLI, Antigravity CLI, and pi: install the CLI once, copy one directory into your agent host, then just say "use onboard-book to convert mybook.pdf". The agent probes the PDF, picks a pipeline, tunes layout parameters against the built-in verification oracle, and hands you only the residue. See plugin/INSTALL.md.

Legal

chesspdf is a personal-use format conversion tool: use it on books you own, for your own study. Do not redistribute extracted positions, solutions, or any other book content. This repository and the published package contain code only — no book content.

More

MIT © Zilin Du

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chesspdf-0.1.1.tar.gz (53.4 kB view details)

Uploaded Source

Built Distribution

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

chesspdf-0.1.1-py3-none-any.whl (67.9 kB view details)

Uploaded Python 3

File details

Details for the file chesspdf-0.1.1.tar.gz.

File metadata

  • Download URL: chesspdf-0.1.1.tar.gz
  • Upload date:
  • Size: 53.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chesspdf-0.1.1.tar.gz
Algorithm Hash digest
SHA256 68bd2b8bbffa64a7beef2b7d2f578510263b90197175b77d34c2e23daaac69d9
MD5 57fe0f937d81e2dd3786c2b9c56b2cb8
BLAKE2b-256 927fca303222ea0d5f81ad34f161f7e61c64f7d7503d3522ca73be3aad561ba8

See more details on using hashes here.

Provenance

The following attestation bundles were made for chesspdf-0.1.1.tar.gz:

Publisher: release.yml on zilin/chesspdf

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

File details

Details for the file chesspdf-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: chesspdf-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 67.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for chesspdf-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 128a28fd92d8877cc4031b3472956e4c670300f311eb67a44d4d634c9640e7c7
MD5 839f2d3707e7d8bb64c2155264a239b4
BLAKE2b-256 0046d105684e468f18a7cf9c217b71a993d9ce362751e1ef5fc47f1b069d3ca8

See more details on using hashes here.

Provenance

The following attestation bundles were made for chesspdf-0.1.1-py3-none-any.whl:

Publisher: release.yml on zilin/chesspdf

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

Release history Release notifications | RSS feed

0.2.1

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.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