Skip to content
Generate card image file to print for board game test play
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Testplay Card Generator

Build Status codecov MIT License


Note: Not it is alpha version so documentation is not completed.
Moreover, how to use may be changed in future.

How do you do when you want to play card game but the card is nothing?

Especially, when you design your board game which uses several cards, you want to print out alpha-version card and try to adjust by using printed ones, don't you?

I hope following for the test play cards generator.

  • Draw basic components, like rectangle and lines
  • Draw text in the bounds
  • Make multiple card images from layout file and contents file
  • Generate file easy to print, like pdf format

This project can provide above features for you.


From layout yml file and card data csv file, this project generates following image(s) and PDF file.

  • PNG Image


I tested it on ubuntu 18.04 and Python 3.6.5 (virtualenv).

You are just user

# only use and install
pip install git+

For Developer

# setup virtualenv if needed
virtualenv .venv
source .venv/bin/activate

# needs to install development tools additionally
python scripts/ requirements-dev.txt


And you have to prepare layout file (yml format) , data file (csv format) .

You can use layout-sample.yml and data-sample.csv for checking to work the program on your local computer well.

How to use

By following command you can run program and get the output.pdf file for printing.

tcgen --layout <your layout file> --data <your data file> --output output.pdf

Layout File

Layout File describe what are drawn and used from data file. layout-sample.yml explains what is valid so please read if needed.

Data File

It is CSV format and each row data is mapped for a card. If you want to make the cards, read layout-sample.yml and data.csv , after that to make yourself contents.


This project source codes and sample resources are under MIT LICENSE .

But it contains Noto Font as default text rendering and the fonts are licensed under the SIL Open Font License 1.1.

You can’t perform that action at this time.