libregamingspaces/script.py

16 lines
364 B
Python
Raw Normal View History

#!/usr/bin/env python3
# SPDX-License-Identifier: CC0-1.0
2022-01-16 20:14:03 +01:00
from mako.template import Template
import json
def render(spaces, template):
appTemplate = Template(filename=template)
print(appTemplate.render(s=spaces))
if __name__ == '__main__':
with open('libregamingspaces.json') as f:
spaces = json.load(f)
2022-01-16 20:14:03 +01:00
render(spaces, './spaces.html')