Automated pipeline for generating conference speaker cards by fetching data from Sessionize, removing backgrounds from profile pictures, and compositing them onto a custom template.
- Automated Fetching: Retrieves session and speaker data directly from Sessionize.
- Background Removal: Cleanly removes backgrounds using
rembg. - Dual Layout Support: Automatically handles single and dual speaker sessions.
- Google Drive Integration: Optional upload of generated cards to a shared Google Drive folder.
- CI/CD: Daily automated runs via GitHub Actions for always-up-to-date speaker cards.
- Python 3.11+
- uv (recommended for dependency management)
-
Install dependencies:
uv sync
-
Configure Environment:
Copy
.env.exampleto.envand fill in your credentials:SESSIONIZE_API_SLUG: Your conference's Sessionize slug.GDRIVE_CREDENTIALS_PATH: (Optional) Path to your Google Service Account JSON key.GDRIVE_FOLDER_ID: (Optional) Target Google Drive folder ID.
-
Assets:
Ensure your
assets/directory contains:base_template.png: The background template (standard size: 1080x1350).DejaVuSans.ttf: The font used for rendering text.
Generate cards locally into the output/ folder:
uv run python src/generate_cards.pyDownload data, generate cards, and push them to Google Drive:
uv run python src/generate_cards.py --uploadThe project includes a GitHub Actions workflow in .github/workflows/generate-cards.yml that runs daily at 06:00 UTC.
To use it, set the following secrets in your GitHub repository:
SESSIONIZE_API_SLUGGDRIVE_CREDENTIALS_JSON(the full content of your Service Account JSON)GDRIVE_FOLDER_ID
Run the suite with coverage:
PYTHONPATH=src uv run pytest tests/ -v