Skip to content

Instantly share code, notes, and snippets.

@autumn-hoerr
autumn-hoerr / create_webpages.command
Created August 3, 2012 14:15 — forked from jasmarc/create_webpages.command
Creates a photo gallery from a folder full of images, somewhat per this request: http://www.idiotking.org/archives/2012/05/exercise-in-futility/
# save as "Rakefile" in desired directory
# cd to directory and type "rake"
task :default => 'make_html'
desc "Turns a directory of images into linked HTML"
task :make_html do
extensions = "png,PNG,jpg,JPG,gif"
working_dir =File.dirname(__FILE__)
pictures = Dir.glob("#{working_dir}/*.{#{extensions}}")