Skip to main content

cwc-cartes

Generate printable unit cards for the Cold War Commander tabletop game.

Given a folder of unit photos and a units.json file, the tool composites card images and saves them as PNGs.

Example output

AMX AuF1 card

Installation

pip install cwc-cartes

Or from source:

pip install -e .

Requires Python 3.9+.

Usage

Generate cards

python -m cwc_cartes.main <folder>

The folder must contain a units.json file and the background images it references. Cards are written to <folder>/generated/.

Options:

Flag Description
-rotate Rotate each card 90°
-no-bleeding-margins Omit the 36 px bleeding margin added around cards by default

Convert a raw army list to JSON

python -m cwc_cartes.converter <raw_file> <country_code> <army_name> <output.json>

The raw file must be a plain-text list where every 9 consecutive lines describe one unit: name, arm, move, combat (attacks/range), hits, save, (blank), (blank), notes.

units.json format

[
  {
    "country": "FR",
    "army": "French Army, Cold War/1st Gulf War/Modern (46+)",
    "name": "AMX AuF1",
    "arm": "artillery",
    "move": "30",
    "attacks": "4",
    "range": "-",
    "hits": "5",
    "save": "6",
    "notes": "Heavy Artillery: 5/100(H) attacks using direct fire while on-table",
    "flavour": "",
    "images": ["FR/7274.jpg"]
  }
]
  • country — uppercase ISO country code; must match a file in cwc_cartes/images/country_flags/
  • arm — unit type; must match a file in cwc_cartes/images/unit_icons/ (without .png)
  • images — paths relative to the folder, or http(s):// URLs
  • "invisible": true — skip card generation for this unit

License

MIT

Metadata

Release files for cwc-cartes 1.0.0

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

Source distribution (sdist)

Source distribution for cwc-cartes 1.0.0
File Size Uploaded Provenance Actions
cwc_cartes-1.0.0.tar.gz 2.5 MB With provenance Details for cwc_cartes-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cwc-cartes 1.0.0
File Interpreter ABI Platform Actions
cwc_cartes-1.0.0-py3-none-any.whl Python 3 none any Details for cwc_cartes-1.0.0-py3-none-any.whl

Total release size: 5.1 MB

Release files / cwc_cartes-1.0.0.tar.gz

Download URL cwc_cartes-1.0.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
256fee715091c48f36236a1a7102464c86f32d2f4b40ed40afadecc75825374d
BLAKE2b-256 checksum
How to use checksums
9679ba83d6f6f7eb4593087eded1e12468bd876d0c02f30a7807083375944a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 9, 2026.

Transparency log

Release files / cwc_cartes-1.0.0-py3-none-any.whl

Download URL cwc_cartes-1.0.0-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6316fe858a2dc1e69f3d1a44e2a6bfcbe012e1654bdc2073bee21d1e4fd2de71
BLAKE2b-256 checksum
How to use checksums
a11f61f9fb0978553e16582c6969138b7b4a3e57031bbe2b97294831d3b5ad92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 9, 2026.

Transparency log

Security for cwc-cartes 1.0.0

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 cwc_cartes-1.0.0.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 May 9, 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

1.0.0 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