I\'m looking to convert an entire directory of HTML to HAML so that the files have the same name but with a new extension.
html2haml file.html.erb file.haml
It's not sexy but it's working:
for file in $(find . -type f -name \*.html.erb); do html2haml -e ${file} "$(dirname ${file})/$(basename ${file} .erb).haml"; done
(Pay attention to the -e flag of html2haml it parses the ERb tags.)
-e
html2haml