Skip to main content

Dominion Divider Generation

Tests

Introduction

This is a script and library to generate card dividers for storing cards for the game Dominion. If you are just looking go generate some dominion dividers, there is no need to install this script as I host a live version of this generator code. However, if you want to use arguments that I don't expose on that page, or change the code, or contribute to the project the full generation code (not the web interface or the fonts) is included here, and contributions are more than welcome.

Again, to generate tabs go to the Online Generator.

Installation

If you install uv you can just run uvx --from domdiv dominion_dividers. It should work, but see notes on better fonts and multilingual sorting below (the warnings will mention these).

If you do need to install the package locally (the script provides a lot more options than the web-based generator), run uv tool install domdiv, which will provide a command named dominion_dividers. However, see the note under Prerequisites->Fonts below as the default install will fall back on a font that doesn't match the cards (though most people don't notice). Run dominion_dividers <outfile> to get a pdf of all dividers with the default options, or run dominion_dividers --help to see the (extensive) list of options.

Additionally, to ensure the card dividers are generated sorted by correct alphabetical order (especially for languages with many accented characters (e.g. Czech)), you are advised to install the optional PyICU library. If PyICU is installed (instructions), the script will sort the card dividers based on selected language alphabet (e.g. in Czech z < ž). Otherwise, default sorting will be used (the cards beginning with accented characters will be at the end of the sorted set).

Documentation

The script has an extensive set of options that are relatively well documented via dominion_dividers --help. Some are hard to describe unless you see output samples, so we recommend running the script with various options to see which configuration you like. The help output is replicated here for reference.

Translations

When changing any of the card database files you should run the language update tool via uv run doit update_languages. This produces the package version of the card db from the card db source. This will also be run automatically and checked into git when you push to github. You should make sure that the resulting changes to the package are what you intend by generating dividers in the relevant languages.

If you would like to help with translations to new (or updating existing) languages, please see instructions here.

Fonts

There are a number of fonts used in Dominion and many of them we cannot distribute with the package. We use fallbacks to commonly distributed fonts that work fine if you don't care the match the game exactly. If you do want to match, the script prints the preferred fonts if it uses fallbacks. Some come with programs like Adobe Reader and you can grab them from there.

Sadly, many of these fonts use features that are not support by the reportlab package. Thus, they need to first be converted to ttf (TrueType) format. I used the open source package fontforge to do the conversion. Included as 'tools/convert_font.ff' is a script for fontforge to do the conversion, on Mac OS X with fontforge installed through macports or homebrew you can just run commands like ./tools/convert_font.ff MinionPro-Regular.otf.

If you select language in domdiv options which is not supported in ISO/IEC 8859-1:1998 (Latin1) (e.g. Czech), you will have to obtain Times Roman TTF fonts as well (see ./src/domdiv/fonts/README.md for details).

To supply fonts locally, put them in a directory and supply the relative path to it to the script via the --font-dir option. Alternatively you can copy the converted .ttf files to the fonts directory in the domdiv package/directory, then perform the package install below.

tools/fontfixer

There is a python native fontfixer.py that can be run with:
uv sync --extra fontfix && uv run fontfix -d path/to/fonts
Reads .otf fonts and outputs .ttf fonts to local_fonts diretory.

Using as a library

The library will be installed as domdiv with the main entry point being domdiv.main.generate(options). It takes a Namespace of options as generated by python's argparser module. You can either use domdiv.main.parse_opts(cmdline_args) to get such an object by passing in a list of command line options (like sys.argv), or directly create an appropriate object by assigning the correct values to its attributes, starting from an empty class or an actual argparse Namespace object.

Developing

Install uv and run uv sync. The dev dependency group is included by default, so this will install the development tooling too. Then, run uv run pre-commit install. The editable project install and dev dependencies are managed through .venv, so commands like uv run dominion_dividers, uv run pytest, and uv run python -m build all use your checked out code without needing a separate pip install -e.

Feel free to comment on boardgamegeek at https://boardgamegeek.com/thread/926575/web-page-generate-tabbed-dividers or file issues on github (https://github.com/sumpfork/dominiontabs/issues).

Tests can be run via uv run doit test. They will also run if/when you push a branch or make a PR.

Image Sources

There is a separate repo for the image sources. While these are optional, they can be useful reference and/or used for creating new or recreating old tab banners, icons, etc. Many of these were originally scans of the physical game. Some of them have a lot of layers and are approaching 1GB in size, so they are hosted via Git LFS. As the Github version of that incurs a higher monthly cost, I instead host them on a private LFS server. If you would like the images or would like to contribute images let me know and I can make you an account on said server, or you I can copy them for you for easier access.

Docker

The project can be compiled into a container:

docker build . -t dominiontabs

Once you have the dominiontabs container you can run it from your CLI and pass it arguments like so, mapping the local directory to where the script will run so you can use local fonts and access the output file (example produces German dividers for Seaside 2nd edition):

docker run -v .:/app dominiontabs --language=de --expansions=seaside2ndEdition

  1. Bind mount to an output directory (-v) and tell the script to output there so that we get a PDF in the local filesystem when things are done (--outfile ./output/foo.pdf).
  2. Add the --rm argo to tell docker not to save a container each time it runs.
  3. Point to the fonts built in to the image with --font-dir /fonts
  4. Add a few CLI args to reduce the runtime and file size (--expansions cornucopia).

So now we have

docker run -v $PWD/output:/app/output --rm dominiontabs --font-dir /fonts --expansions cornucopia --outfile ./output/dominion_dividers_docker.pdf

(Replace $PWD with %cd% on Windows OS)

Once that runs you should have under your current directory:

./output/dominion_dividers_docker.pdf

From there you feel free to add other arguments as you like!

Metadata

Release files for domdiv 4.9.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for domdiv 4.9.4
File Size Uploaded Provenance Actions
domdiv-4.9.4.tar.gz 26.1 MB With provenance Details for domdiv-4.9.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for domdiv 4.9.4
File Interpreter ABI Platform Actions
domdiv-4.9.4-py3-none-any.whl Python 3 none any Details for domdiv-4.9.4-py3-none-any.whl

Total release size: 51.3 MB

Release files / domdiv-4.9.4.tar.gz

Download URL domdiv-4.9.4.tar.gz
Size 26.1 MB
Tags Source
SHA-256 checksum
How to use checksums
eec6a1d41403d07bb488d78190120ce865d1ec7fac045d4a630028a8e8f765c0
BLAKE2b-256 checksum
How to use checksums
a316a8af32c782da888711b40a2c1c28aed0f9e102b1b3a65b59eb24b38b892d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Release files / domdiv-4.9.4-py3-none-any.whl

Download URL domdiv-4.9.4-py3-none-any.whl
Size 25.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8b7a9431d54ae196367884aeb2f4eec00ce5af430d9d7e34fc92d9d2c4157a8a
BLAKE2b-256 checksum
How to use checksums
7d3a3547c50aa969b48c8fcc469bd9a5353122bf7628935659f218543cd92a70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

Security for domdiv 4.9.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for domdiv-4.9.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.9.4 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page