1
0
Fork 0
mirror of https://github.com/Luzifer/past3.git synced 2024-11-10 00:40:00 +00:00
past3/generate.py
Knut Ahlers dd6c9ee00e
Script can run under python3
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2019-01-14 11:46:13 +01:00

10 lines
271 B
Python
Executable file

#!/usr/bin/env python
import yaml
from jinja2 import Environment, FileSystemLoader
config = yaml.load(open('config.yml', 'r').read())
env = Environment(loader=FileSystemLoader('./'))
template = env.get_template('index.html')
print(template.render({'config': config}))