Skip to content

Generate card image file to print for board game test play

License

Notifications You must be signed in to change notification settings

a-hisame/testplay-card-generator

Repository files navigation

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.

Example

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

  • PNG Image

Install

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

You are just user

# only use and install
pip install git+https://github.com/a-hisame/testplay-card-generator.git

For Developer

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

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

Preparation

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.

LICENSE

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.

About

Generate card image file to print for board game test play

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published