20 lines
400 B
Python
20 lines
400 B
Python
from mako.template import Template
|
|
import json
|
|
import itertools
|
|
import argparse
|
|
|
|
|
|
def mxc2url(mxc):
|
|
serverName = mxc.split('/')[2]
|
|
mediaId = mxc.split('/')[3]
|
|
return "https://matrix.org/_matrix/media/v3/download/" + serverName + "/" + mediaId
|
|
|
|
appTemplate = Template(filename='./spaces.html')
|
|
f = open('libregamingspaces.json')
|
|
spaces=json.load(f)
|
|
|
|
print(appTemplate.render(s=spaces))
|
|
|
|
|
|
|