Output haml document tree & subfolders to another directory as html files

I building themes with haml for a CMS based on php and zend
framework.
Although I could implement haml directly into it, I rather use ruby
and therefore try to find a solution for this:

Go true a complete document tree and all subfolders, these folders
contain haml files
Then output each haml file in another directory like /output with
preserve of the orginal document tree but as a saved html file

/haml_templates/
home.html.haml
about.html.haml
/subdir
header.html.haml

I would run some tool or a ruby script that would create:

/haml_exported/
home.html
about.html
/subdir
header.html

Is there something out I could use for above problem? I thought of
creating a ruby script for this but that is rather to advanched at the
moment for my ruby on rails skills.
Hope to find a solution for this, please let me know if you have an
idea! Thanks in advanche!

rubybox wrote:

I building themes with haml for a CMS based on php and zend
framework.
Although I could implement haml directly into it, I rather use ruby
and therefore try to find a solution for this:

Seems like the wrong tool. Why not just use pHaml with the CMS?

If not, then perhaps something like StaticMatic is what you’re looking
for.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]