Created
May 30, 2012 06:22
-
-
Save pamelafox/2834077 to your computer and use it in GitHub Desktop.
Handlebars Folder Renderer Script
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
import os | |
input_path = 'application/templates' | |
output_path = 'application/static/js/templates' | |
os.system('mkdir %s' % output_path) | |
dir_list = os.listdir(input_path) | |
for file_name in dir_list: | |
if file_name.endswith('.handlebars'): | |
cmd = 'handlebars %s/%s -f %s/%s' % (input_path, file_name, output_path, file_name.replace('handlebars', 'js')) | |
print cmd | |
os.system(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment