Convert .pdfs of Daggerheart statblocks to your favorite text-based storage format.
Project description
lazydh
lazydh converts pdf files of Daggerheart-compatible Adversary and Environment statblocks to text-based formats to meet GMs where they prep.
lazydh extracts text using Optical Character Recognition (OCR) via pymupdf, and then performs a best-faith reconstruction of each entity. This best-faith reconstruction leverages the predictable structure of Daggerheart-comptabile statblocks to parse extracted text. However, OCR is not perfect, so some errors of varying degrees are likely. If ever lazydh is not able to assign an expected trait (e.g. attack mod, environmental impulses, features, etc.) it will throw a warning calling out the specific adversary and attribute it was unable to represent.
The currently supported output formats are:
- Markdown
- JSON
- Fantasy Statblock JSON
Requirements
lazydh is Python package/cli tool and thus requires Python. The project was built using uv, and while it should function without it, the added environment management is nice and may come in handy depending on your setup.
lazydh has been tested on linux and macos, but should work on Windows.
Installation
uv tool install lazydh
or
pip install lazydh
Development Version
uv add lazydh[dev]
Extracting Statblocks
To extract statblocks from a pdf, simply invoke the lazydh command from the command line while pointing the tool to your .pdf of interest:
# get your favorite set of statblocks
wget https://www.daggerheart.com/wp-content/uploads/2025/09/Adversaries-Environments-v1.5-.pdf
# convert statblocks
lazydh Adversaries-Environments-v1.5-.pdf --outdir output/void-v1-5 --source "Void 1.5"
By default, lazydh writes statblocks to individual markdown files. Two other json-based outputs are also supported in the form of "json" and "fantasy_statblock" options.
lazydh Adversaries-Environments-v1.5-.pdf --outdir output/void-v1-5 --source "Void 1.5 --output json"
lazydh Adversaries-Environments-v1.5-.pdf --outdir output/void-v1-5 --source "Void 1.5 --output fantasy_statblock"
For full options, run:
lazydh --help
Python Library
lazydh is not only a command line utility, but also a fully-fleged Python package. There is more flexibility in the Python package than is exposed to the command line tool. For example, if you would like to not print .yaml front matter for each markdown file, this can be accomplished in the following way:
from lazydh import PdfLoader
reader = PdfLoader("Adversaries-Environments-v1.5-.pdf")
reader.read_statblocks()
reader.to_markdown(out_dir = "output/void-v1-5", frontmatter=False)
Roadmap
- Development Docs
- Expanded Tests
Additional Features and Contributing
If you would like to request an in-scope additional feature (e.g. additional output formats), feel free to open an issue. This is a passion project I work on when I have time, so no guarantee on an immediate response.
If you have a bug to report, again feel free to open an issue, but be aware I can only test on .pdfs I have legal access to.
If you would like to contribute a feature, feel free to fork the repository, implement your feature, and then open a pull request. Requirements for pull requests:
- Full explanation and overview of the new feature.
- All new functionality must be unit tested with all previous tests passing.
- Tests should be written in
pytestand executable withuv run pytest.
- Tests should be written in
- Developer documentation and fully typed functions.
- No AI generated code. If you can't bother to write the code, I won't bother to review it. This is a passion project: lean into the friction and enjoy the meaning generating process.
Disclaimer
lazydh is a tool to extract and format text of .pdf files you already have legal access to. Respect the copyright and terms of all content you plan to convert.
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 lazydh-1.0.0b1.tar.gz.
File metadata
- Download URL: lazydh-1.0.0b1.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
389cb05c9231e9068d9ae91edbd55e4fd12920832e20ea478c20a65436132ca7
|
|
| MD5 |
f35fc3ab2a950ede4c23e0910070c939
|
|
| BLAKE2b-256 |
16b0640ace78c36210c44113b62d58ad87ceeb0b98dd3731c41406cea924b588
|
File details
Details for the file lazydh-1.0.0b1-py3-none-any.whl.
File metadata
- Download URL: lazydh-1.0.0b1-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03cad2b885990a41d3c35de0e4628904aa4a69ae0d78fc97bafda20bb705c539
|
|
| MD5 |
6622539007e9c386805018817b4f3fc9
|
|
| BLAKE2b-256 |
16c1b078dafdd0db2296cc7117ab205595fe4e292c196ac58497b5a835e613da
|