Remove repeated function in script.py
This commit is contained in:
parent
694c809dda
commit
93e20513f5
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue