1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-21 17:22:29 +00:00
This commit is contained in:
J. Fernando Sánchez 2016-01-19 19:57:59 +01:00
commit 66596707e4

12
genera.py Normal file
View File

@ -0,0 +1,12 @@
from __future__ import print_function
import csv
from jinja2 import Template
with open('PC Members.tsv') as f:
contacts = csv.DictReader(f, delimiter='\t')
with open('index.j2') as templatefile:
template = Template(templatefile.read())
with open('web/index.html', 'w') as web:
web.write(template.render(contacts=contacts))