Create helper cards for Cold War Commander from list of units and pictures
Project description
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
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 incwc_cartes/images/country_flags/arm— unit type; must match a file incwc_cartes/images/unit_icons/(without.png)images— paths relative to the folder, orhttp(s)://URLs"invisible": true— skip card generation for this unit
License
MIT
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 cwc_cartes-1.0.0.tar.gz.
File metadata
- Download URL: cwc_cartes-1.0.0.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
256fee715091c48f36236a1a7102464c86f32d2f4b40ed40afadecc75825374d
|
|
| MD5 |
9c3002e6fad6a940fedf8f6a95b8cd37
|
|
| BLAKE2b-256 |
9679ba83d6f6f7eb4593087eded1e12468bd876d0c02f30a7807083375944a1e
|
Provenance
The following attestation bundles were made for cwc_cartes-1.0.0.tar.gz:
Publisher:
publish.yml on aubustou/cwc-cartes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cwc_cartes-1.0.0.tar.gz -
Subject digest:
256fee715091c48f36236a1a7102464c86f32d2f4b40ed40afadecc75825374d - Sigstore transparency entry: 1484595799
- Sigstore integration time:
-
Permalink:
aubustou/cwc-cartes@b2cbec0f9e1cf77a629c79f392717e0419647d77 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/aubustou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b2cbec0f9e1cf77a629c79f392717e0419647d77 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cwc_cartes-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cwc_cartes-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6316fe858a2dc1e69f3d1a44e2a6bfcbe012e1654bdc2073bee21d1e4fd2de71
|
|
| MD5 |
8f07bc8354cac649ac422412ed4187c6
|
|
| BLAKE2b-256 |
a11f61f9fb0978553e16582c6969138b7b4a3e57031bbe2b97294831d3b5ad92
|
Provenance
The following attestation bundles were made for cwc_cartes-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on aubustou/cwc-cartes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cwc_cartes-1.0.0-py3-none-any.whl -
Subject digest:
6316fe858a2dc1e69f3d1a44e2a6bfcbe012e1654bdc2073bee21d1e4fd2de71 - Sigstore transparency entry: 1484595816
- Sigstore integration time:
-
Permalink:
aubustou/cwc-cartes@b2cbec0f9e1cf77a629c79f392717e0419647d77 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/aubustou
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b2cbec0f9e1cf77a629c79f392717e0419647d77 -
Trigger Event:
release
-
Statement type: