A Python project for generating Spot It! (a.k.a Dobble) cards.
This projects generates the sheets with Spot It! cards. The images are randomly sized and rotated. The cards' images are laid out according to circle packing algorithm.
The placeholder numbered images can be generated by spotit/utilities/image_generator.py
. This is done with OpenCV library.
Clone the repository:
git clone https://github.com/LukasMaly/spot-it-generator.git
cd ./spot-it-generator
Install the required packages:
pip install -r requirements.txt
- circlify - circle packing layout algorithm
- ReportLab - library for generating PDFs and graphics
Copy input images into ./images/
.
Set parameters (such are order of the game or sheet specifications) in main.py
and run it:
python main.py
The result sheet will be rendered into cards.pdf
.
Run the tests for cards generation:
python -m unittest tests/test_cards.py
- William Radigan for pySpot-It (https://github.com/WRadigan/pySpot-It) used for generating Spot It! like number sets.