feat(mako): LICENSE + README.md

Readme is very initial, but the architecture is set to evolve it to
something no less than beatiful.
This commit is contained in:
Sebastian Thiel
2015-03-02 14:58:18 +01:00
parent 4e5f2c05d9
commit 3670e4f6c9
8 changed files with 64 additions and 13 deletions

View File

@@ -308,13 +308,14 @@ def cmdline(argv=None):
try:
result = template.render(**data_converted)
if output_file:
if not os.path.isdir(dirname(output_file)):
os.makedirs(dirname(output_file))
dir = dirname(output_file)
if dir and not os.path.isdir(dir):
os.makedirs(dir)
fh = open(output_file, "wb")
fh.write(result)
fh.write(result.encode('utf-8'))
fh.close()
else:
print(result)
print(result.encode('utf-8'))
except:
_exit()
# end for each input file