libregamingspaces/script.py

16 lines
364 B
Python
Executable File

#!/usr/bin/env python3
# SPDX-License-Identifier: CC0-1.0
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)
render(spaces, './spaces.html')