Creates OBS streaming layouts and card grids for Magic: The Gathering. Used by Clock Spinning Podcast.
Run the script and choose a mode:
./download_images.pyThree modes available:
- SCRY: Fetch cards from Scryfall search query
- BOOST: Generate a random booster pack
- CUSTOM: Use your own images
Fetch cards from Scryfall and create layouts.
./download_images.py- Choose
SCRYFALLmode - Enter search query (e.g.,
set:neo,type:creature cmc:3) - Enter grid arrangement (e.g.,
8x0,9x0)
See Scryfall syntax for search queries.
Example queries:
set:neo- Kamigawa: Neon Dynasty cardstype:creature cmc:3- 3-mana creaturesc:red type:instant- Red instantsrarity:mythic- Mythic rares
Generate a random booster pack for any set.
./download_images.py- Choose
BOOSTERmode - Enter set code (e.g.,
NEO,ONS,TSP)
The script handles set-specific booster structures automatically:
- Historical sets (Arabian Nights, The Dark, etc.)
- Pre-mythic era (11/3/1 structure)
- Modern sets (mythic rarity, 1/8 chance)
- Special cards (Time Spiral timeshifted)
Grid arrangement is determined automatically.
Use your own images instead of MTG cards.
./download_images.py- Choose
CUSTOMmode - Enter grid arrangement (e.g.,
8x0,9x0)
Image requirements:
Create a /custom/ directory with paired images:
- Each pair needs a vertical (portrait) and horizontal (landscape) image
- Naming format:
{number}v.{ext}and{number}h.{ext} - Supported formats:
png,jpg,jpeg,gif
Example:
custom/
1v.png # First vertical image
1h.jpg # First horizontal image
2v.png # Second vertical image
2h.gif # Second horizontal image
3v.jpg # Third vertical image
3h.png # Third horizontal image
Both images in each pair are required. Numbers can be non-sequential but must match.
All modes produce:
- Individual layouts:
images_export_final/- Each image on marble background with frame and transparency - Card grid:
grid.png- Montage of all images on title background
Add a custom image to first and last title slides:
- Add
hero.jpg,hero.png,hero.jpeg, orhero.gifto/resources/ - Answer
ywhen prompted for hero image
The hero image is resized (max 850×1250px) and centered on title slides.
Format: {width}x{height}
Examples:
8x0- 8 wide, auto height9x0- 9 wide, auto height4x4- 4×4 grid (16 images)5x3- 5 wide, 3 tall (15 images)
Use 0 for auto-calculated dimension.
Remove generated files:
./cleanup.py- Python 3
- ImageMagick:
brew install imagemagick - wget:
brew install wget
View booster composition without generating images:
./booster_builder.pyEnter a set code to see card composition and rarity breakdown.
obs-layouts/
├── booster_builder.py # Booster composition tool
├── cleanup.py # Cleanup utility
├── download_images.py # Main script
├── scry # Scryfall API client
├── resources/ # Background assets
└── legacy_bash_scripts/ # Original bash implementations
The Python scripts replaced brittle bash implementations. Bash versions preserved in legacy_bash_scripts/ for reference.
"Command not found": Install missing dependencies (ImageMagick, wget, Python 3)
Custom directory validation errors: Ensure all numbered pairs have both v and h images with matching numbers
Code: MIT License (Copyright 2025 Austin Schaefer). See LICENSE.
Assets in /resources/: All rights reserved. May not be copied, modified, or distributed without permission.
Bundles scrycall (MIT licensed) for convenience.