Remove repeated function in script.py

This commit is contained in:
Rampoina 2022-04-18 00:21:15 +02:00
parent 694c809dda
commit 93e20513f5
1 changed files with 0 additions and 6 deletions

View File

@ -4,11 +4,6 @@
from mako.template import Template
import json
def mxc2url(mxc):
serverName = mxc.split('/')[2]
mediaId = mxc.split('/')[3]
return "https://matrix.org/_matrix/media/v3/download/" + serverName + "/" + mediaId
def render(spaces, loops, template):
appTemplate = Template(filename=template)
print(appTemplate.render(s=spaces,loops=loops))
@ -35,5 +30,4 @@ if __name__ == '__main__':
spaces={'name':"TOP"}
loops=['!JTpfWshTKZpZiUASvP:hacklab.fi']
make_hierarchy(spaces,ROOMS['!IdUUdKALNzBLKEjvbP:matrix.org'], loops)
#print(spaces)
render(spaces, loops, './spaces.html')