This project is a simple script to generate speaker placards for PyCascades. It uses the Pretalx API to get the speaker information and then generates PNG images for each speaker with their name, talk title, and profile picture.
- Install the requirements
pip install -r requirements.txt
- Export the Pretalx token:
export PRETALX_TOKEN=xxx
- Edit the settings for the new year (this should just be the
YEAR
variable inmake_images.py
) - Run the script
python make_images.py
The image templates are built using Krida, a cross-platform open-source image editing program.
The templates are in the templates
directory (the .kra
files are Krita files, the .png
files are exported PNGs).
The templates themselves leverage multiple layers to allow for easier editing of the logos and yearly URLs.
After exporting the speaker data from Pretalx, the script will loop through each speaker and generate a PNG image for them.
The title, speaker name, and profile picture are all added to the image using the PIL
(pillow
) library.
This library supports operations for adding text and images to an image, which is how the placards are generated.
The exact placement of the text and images can be quite finicky, and would need to be adjusted and iterated on for a different conference. A Jupyter notebook has also been provided which shows the initial iterations that were done to get the text and images in the correct place for this particular template.