Created
April 1, 2012 19:48
-
-
Save emilong/2278098 to your computer and use it in GitHub Desktop.
Convert HTML to HAML
This file contains 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
require 'rubygems' | |
require 'find' | |
require 'haml' | |
require 'haml/html' | |
Find.find("content") do |path| | |
if path.end_with? "htm" | |
File.open(path) do |input| | |
File.open(path + "l.haml", "w") do |output| | |
output.write Haml::HTML.new(input.read).render | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment