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).
# only use and install
pip install git+https://github.com/a-hisame/testplay-card-generator.git
# setup virtualenv if needed
virtualenv .venv
source .venv/bin/activate
# needs to install development tools additionally
python scripts/install.py 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.
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 describe what are drawn and used from data file.
layout-sample.yml
explains what is valid so please read if needed.
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.