Mercurial > public > sg101
diff tools/ssg101/ssg101.py @ 1200:b9514abc2a67
Initial commit of ssg101.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 24 Jun 2023 16:06:51 -0500 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/ssg101/ssg101.py Sat Jun 24 16:06:51 2023 -0500 @@ -0,0 +1,17 @@ +import jinja2 + + +def main(): + print('Hello World') + + env = jinja2.Environment( + loader=jinja2.PackageLoader('ssg101'), + ) + template = env.get_template('home.html') + + with open('output/home.html', 'w') as fp: + fp.write(template.render()) + + +if __name__ == '__main__': + main()