Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.62 KB

README.md

File metadata and controls

26 lines (18 loc) · 1.62 KB

PyCascades Speaker Placard Generator

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.

Running

  1. Install the requirements pip install -r requirements.txt
  2. Export the Pretalx token: export PRETALX_TOKEN=xxx
  3. Edit the settings for the new year (this should just be the YEAR variable in make_images.py)
  4. Run the script python make_images.py

Image templates

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.

Technical explanation

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.