blob: 97418ca442516ae8c375099a881d6487fe1dbbfe [file] [log] [blame]
Deepak Kodihalli8457f822016-11-29 06:05:39 -06001#!/usr/bin/env python
2
3import os
4import yaml
5from mako.template import Template
6
7if __name__ == '__main__':
8 script_dir = os.path.dirname(os.path.realpath(__file__))
9 with open(os.path.join(script_dir, 'writefru.yaml'), 'r') as fd:
10 yamlDict = yaml.safe_load(fd)
11
12 # Render the mako template
13 template = os.path.join(script_dir, 'writefru.mako.hpp')
14 t = Template(filename=template)
15 with open('writefru.hpp', 'w') as fd:
16 fd.write(
17 t.render(
18 fruDict=yamlDict))