Created
December 23, 2010 00:11
-
-
Save mccutchen/752348 to your computer and use it in GitHub Desktop.
Uses pictogrid to generate a giant Daily Drop Cap poster.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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