Skip to content

Instantly share code, notes, and snippets.

@mccutchen
Created December 23, 2010 00:11
Show Gist options
  • Save mccutchen/752348 to your computer and use it in GitHub Desktop.
Save mccutchen/752348 to your computer and use it in GitHub Desktop.
Uses pictogrid to generate a giant Daily Drop Cap poster.
"""Generates a giant Daily Drop Cap poster. Get the images into the dropcap/
subdir with something like:
curl -O http://jhische.com/dailydropcap/[A-Z]-[1-12].jpg
Depends on pictogrid and PIL.
"""
import glob
import re
import logging
import pictogrid
logging.getLogger().setLevel(logging.INFO)
def sort(path):
return int(re.search(r'(\d+)', path).group(1))
imgs = sorted(glob.glob('dropcap/*.jpg'), key=sort)
pictogrid.pictogrid(imgs, 26, 575, 480, padding=200, outpath='dropcap.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment