1
0
mirror of https://github.com/Luzifer/past3.git synced 2024-09-19 08:52:59 +00:00
past3/generate.py

11 lines
295 B
Python
Raw Normal View History

#!/usr/bin/env python
2017-01-14 20:07:48 +00:00
import yaml
from jinja2 import Environment, FileSystemLoader
config = yaml.load(open('config.yml', 'r').read(), Loader=yaml.SafeLoader)
2017-01-14 20:07:48 +00:00
env = Environment(loader=FileSystemLoader('./'))
template = env.get_template('index.html')
print(template.render({'config': config}))