Skip to content

Instantly share code, notes, and snippets.

@stevehorn
Created August 18, 2010 03:24
Show Gist options
  • Save stevehorn/533263 to your computer and use it in GitHub Desktop.
Save stevehorn/533263 to your computer and use it in GitHub Desktop.
balsamiq = 'C:/Program Files (x86)/Balsamiq Mockups/Balsamiq Mockups.exe'
mockup_directory = 'C:/Mockups'
output_directory = 'C:/Mockups/Images'
require 'find'
files = Array.new
Find.find(mockup_directory) do |f|
if /.bmml$/.match(f)
files << f
end
end
files.each do |file|
out_file = File.basename(file, ".bmml")
full_output_file_path = output_directory + "/" + out_file + ".png"
system_command = "#{balsamiq} export \"#{file}\" \"#{full_output_file_path}\""
puts system system_command
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment