From 74978a8ae4380d3820a9daefafe8a587c2ab933a Mon Sep 17 00:00:00 2001 From: Rampoina Date: Sun, 17 Apr 2022 22:28:37 +0200 Subject: [PATCH] Fix the structure to recursively contain spaces --- list.html | 4952 +++++++++++++++++++++++++++++---------------------- script.py | 31 +- spaces.html | 12 +- 3 files changed, 2893 insertions(+), 2102 deletions(-) diff --git a/list.html b/list.html index e530feb..753f1d8 100644 --- a/list.html +++ b/list.html @@ -1,3 +1,4 @@ + @@ -7,2244 +8,3025 @@ - +
-
Subspace: Libre Gaming - - + + +
TOP
+ + + + + + +
Libre Gaming
+ + + + + + + +
Games
+ + + + + + + + + + +
SuperTuxKart Soccer
+ + + + + + + + +
+ +
STK Soccer Tournament - Announcements
+ +
+
+ + + + + + + + +
+ +
STK Soccer Tournament - Match scheduling
+ +
+
+ + + + + + + + +
+ +
STK Soccer Tournament - General
+ +
+
+
+ - - - +
#unknown-horizons
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - +
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Subspace: Games - - +
+
+ - - - +
#your-land
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - -
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
Subspace: SuperTuxKart Soccer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
#unknown-horizons
- -
#your-land
- -
#cataclysmdda
- -
#arianne
- -
khaganat@chat.khaganat.net
- -
0 AD Central
Subspace: Veloren - - - - - - - -
Subspace: Tuxemon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
#pioneer
- -
#idlerpg
- -
0 A.D. Central
- -
SuperTuxKart
- -
Arcmage
- -
Go/Weiqi/Baduk
Subspace: OpenHV - - - - - - - -
Subspace: Super Tux Party - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
Nomic 202109 LibreGaming
- -
speed-dreams-dev@chat.jabberfr.org
- -
Librerama
- -
Xonotic Main
- -
#widelands
- -
#hedgewars
- -
#widelands
Subspace: Hypnagonia - - - - - - - - - - - - - - -
- -
Steam Sky
Subspace: FlightGear and JSBSim - - - - - - - - +
Subspace: Mindustry - - +
+
+ - - - +
#cataclysmdda
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- -
#mindustry-logic
- -
#mindustry
- -
#mindustry-designs
- -
Development
- -
#social
- -
#mindustry-announcements
- -
#mindustry-maps
- -
Logic
- -
mindustry balancing
- -
Programming
- -
Mindustry
- -
Bots
Subspace: Minetest - - +
+
+ - - - +
#arianne
- - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- -
minetest-mod-deck
- -
orion
- -
#minetest
- -
#minetest-dev
- -
Minetest
- -
Minetest Offtopic
- -
#minetest
Subspace: Unvanquished (space) - - +
+
+ - - - +
khaganat@chat.khaganat.net
- - - - - - - - - - + + - - +
- + - -
- - - -
- - - -
- - - -
+
+ + + - + - +
0 AD Central
+ + + + +
- -
Unvanquished
- -
+
+ + - - - - - - + + + + + + +
- -
Unvanquished Development
Veloren
+ + + - + - +
#offtopic
+ + + + +
- -
Unvanquished Français
- -
+
+ + - + + + + + + + + + + + + + + + + + + + + +
Subspace: The Mana World - - + + + + + +
+ +
#blog-content
+ +
+
+ + + + + + + + +
+ +
#combat
+ +
+
+ + + + + + + + +
+ +
#gallery
+ +
+
+ + + + + + + + +
+ +
#game-design
+ +
+
+ + + + + + + + +
+ +
#memeloren
+ +
+
+ + + + + + + + +
+ +
#physics
+ +
+
+ + + + + + + + +
+ +
#programmers
+ +
+
+ + + + + + + + +
+ +
#screenshots
+ +
+
+ + + + + + + + +
+ +
#veloren-matrix
+ +
+
+ + + + + + + + +
+ +
#general
+ +
+
+ + + + + + + + +
+ +
#support
+ +
+
+ + + + + + + + +
+ +
#feedback
+ +
+
+ + + + + + + + +
+ +
#ingame-chat
+ +
+
+ + + + + + + + +
+ +
#pets-and-mounts
+ +
+
+ + + + + + + + +
+ +
#questions
+ +
+
+ + + + + + + + +
+ +
#learning
+ +
+
+ + + + + + + + +
+ +
#new-contributors
+ +
+
+ + + + + + + + +
+ +
#rendering
+ +
+
+ + + + + + + + +
+ +
#concept-art
+ +
+
+ + + + + + + + +
+ +
#meta
+ +
+
+
+ + + + + + + + + + + +
Tuxemon
+ + + + + + + + +
+ +
Tuxemon Matrix Off-Topic
+ +
+
+ + + + + + + + +
+ +
Tuxemon Matrix
+ +
+
+ + + + + + + + +
+ +
Tuxemon Matrix - RSS Commits
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Tuxemon Discord Bridge Space
+ + + + + + + + +
+ +
Tuxemon: Discord (#writing)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#art)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#announcements)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#programming)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#translations)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#music)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#map-development)
+ +
+
+ + + + + + + + +
+ +
t2bot.io status
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#help)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#off-topic)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#bot-talk)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#bot-testing)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#website)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#general)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (#rules)
+ +
+
+ + + + + + + + +
+ +
Tuxemon: Discord (archived #general)
+ +
+
+
+
+ - - - +
#pioneer
- - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
- + - -
- - - -
- - - -
- - - -
- - - -
- -
#themanaworld-dev
- -
#themanaworld
- -
Matrix
- -
#moubootaur-legends
Subspace: Engines - - +
+
+ - - - +
#idlerpg
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - +
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
+
+ + + - + - +
0 A.D. Central
+ + + + +
- -
Haskell roguelike Allure of the Stars and its engine LambdaHack
- -
+
+ + + - + - +
SuperTuxKart
+ + + + +
- -
#ryzom
- -
+
+ + + - + - +
Arcmage
+ + + + +
- -
openage
- -
+
+ + - + + + + + +
Subspace: CorsixTH - - + + + + + +
+ +
Go/Weiqi/Baduk
+ +
+
+ + + + + + + + + + +
OpenHV
+ + + + + + + + +
+ +
OpenHV Chat
+ +
+
+ + + + + + + + +
+ +
OpenHV Develop
+ +
+
+ + + + + + + + +
+ +
OpenHV Play
+ +
+
+
+ + + + + + + + + +
Super Tux Party
+ + + + + + + + +
+ +
SuperTuxParty Dev Talk
+ +
+
+ + + + + + + + +
+ +
SuperTuxParty Random Talk
+ +
+
+
+ + + + + + + + +
+ +
Nomic 202109 LibreGaming
+ +
+
+ - - - +
speed-dreams-dev@chat.jabberfr.org
- - - - - - - - - - - - - - + + - - +
- + - -
- - - -
- - - -
- - - -
- - - -
+
+ + + - + - +
Librerama
+ + + + +
- -
CorsixTH Community Content
- -
+
+ + + - + - - +
Xonotic Main
- - - - - - - +
- -
CorsixTH Technical
- -
- -
CorsixTH Announcements
Subspace: Godot - - + + + +
+
+ - - - +
#widelands
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- -
Godot Unmoderated
- -
French Godot
- -
Godot Italia
- -
German Godot
- -
Godot Engine
- -
Japanese Godot
- -
Godot Latino
- -
godot-haskell
Subspace: SimulaVR - - +
+
+ - - - +
#hedgewars
- - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
- + - -
- - - -
- - - -
- - - -
- - - -
- -
Wayland with Godot
- -
SimulaVR
- -
Nix Haskell
- -
#freeheromesh
- -
Keid
- -
Open Jedi Knight (Unofficial)
- -
Vanilla Conquer
Subspace: Communities - - +
+
+ - - - +
#widelands
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - +
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
+
+ + - - - - - - + + + + + +
- -
Libre Game Night
Hypnagonia
+ + + - + - +
Hypnagonia Announcements
+ + + + +
- -
#libreplanet-gaming
- -
+
+
+ + + - + - +
Steam Sky
+ + + + +
- -
smac@conference.bitcheese.net
- -
+
+ + - - - - -
- - - -
Subspace: Opensource_gaming - - + + + + + +
Mindustry
+ - - - +
#mindustry-logic
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - +
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
+
+ + + - + - - +
#mindustry
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
- -
Welcome/Rules
- -
- -
General
- -
#osg-irc
- -
Offtopic
- -
Matchmaking
- -
twitch-chat
- -
News
- -
Free, Libre, and Open Source Gaming
- -
#general@irc.freegamedev.net
Subspace: wtactics - - + + + +
+
+ - - - +
#mindustry-designs
- - - - - - - - - - - - - - + + - - +
- + - -
- - - -
- - - -
- - - -
- - - -
+
+
+ + - - - - - - + + + + + + +
- -
MeetAndMatch
Minetest
+ + - + + + +
Subspace: Open-Source-RTS-Xmas-party-Invite - - + + + + + +
+ +
minetest-mod-deck
+ +
+
+ + + + + + + + +
+ +
orion
+ +
+
+ + + + + + + + +
+ +
#minetest
+ +
+
+
+ + + + + + + + + + +
Unvanquished (space)
+ + + + + + + + +
+ +
Unvanquished
+ +
+
+ + + + + + + + +
+ +
Unvanquished Development
+ +
+
+ + + + + + + + +
+ +
Unvanquished Français
+ +
+
+
+ + + + + + + + + + + +
The Mana World
+ + + + + + + + +
+ +
#themanaworld-dev
+ +
+
+ + + + + + + + +
+ +
#themanaworld
+ +
+
+ - - - +
Matrix
- - - - - - + + - - +
- + - -
- - - -
- - - -
+
+ + + - + - +
#moubootaur-legends
+ + + + +
- -
Welcome and when to we meet :)
- -
+
+
+ + - - - - - - + + + + + +
- -
Off-topic
Blocknerd Games
+ + - + + + + + + + + + + + + + + + + +
Subspace: Historical - - + + + + + +
+ +
Minigames Galore - AES Dev
+ +
+
+ + + + + + + + +
+ +
Minigames Galore - Discussion
+ +
+
+ + + + + + + + +
+ +
Minigames Galore - Matchmaking
+ +
+
+ + + + + + + + +
+ +
Blockbomber - Dev
+ +
+
+ + + + + + + + +
+ +
Blocknerd Games - General
+ +
+
+ + + + + + + + +
+ +
Blocknerd Games - Events
+ +
+
+ + + + + + + + +
+ +
Blocknerd Games - ideas and feedback
+ +
+
+ + + + + + + + +
+ +
Blockbomber - Chat
+ +
+
+ + + + + + + + +
+ +
Blockbomber - Matchmaking
+ +
+
+ + + + + + + + +
+ +
Minigames Galore - Ingame
+ +
+
+ + + + + + + + +
+ +
Blockbomber - ingame
+ +
+
+ - - - +
CenteriaSurvival - Ingame
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + +
- + - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- - - -
- -
#libregamenight
- -
Libre Game Night
- -
#libreplanet-gaming
- -
#freegamer
- -
#corsix-th
- -
#unknown-horizons
- -
#ryzom@irc.freegamedev.net
- -
#libregamewiki
- -
SuperTuxKart (STK)
- -
0 AD Central
Subspace: Tools - - +
+
+ - - - +
CenteriaSurvival - Chat
- - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
- + - -
- - - -
- - - -
- -
Highscore
- -
Arcadia / Athenaeum / LibreSteam
- -
#libregamewiki
Subspace: Organisation - - +
+
+ - - - +
Land Of Catastrophe (Exile)
- - - - - - - - - - - - - - + + - - +
- + - -
- - - -
- - - -
- - - -
- - - -
+
+ + - + - - +
BuildaCity-ingame
- - - - - - - - - - - - - - - - - - - + + +
- -
Organisation
- -
- -
Chamber
- -
Website
- -
Sysadmin
+
+
+ + + + + + + + + + + +
Xonotic official space
+ + + + + + + + +
+ +
Xonotic Main
+ +
+
+ + + + + + + +
+ +
Xonotic Pickup
+ +
+
+ + + + + + + + +
+ +
Xonotic Mapping
+ +
+
+ + + + + + + + +
+ +
Xonotic Development
+ +
+
+
+ + + + + + + + +
+ +
Cataclysm Dark Days Ahead
+ +
+
+ + + + + + + + +
+ +
FreeOrion
+ +
+
+ + + + + + + + +
+ +
Librerama
+ +
+
+ + + + + + + + + + + + + + + + +
Naev Community
+ + + + + + + + +
+ +
General
+ +
+
+ + + + + + + + +
+ +
Development
+ +
+
+ + + + + + + + +
+ +
Bugs
+ +
+
+ + + + + + + + +
+ +
Gameplay
+ +
+
+ + + + + + + + +
+ +
Brainstorming
+ +
+
+ + + + + + + + +
+ +
Offtopic
+ +
+
+ + + + + + + + +
+ +
Artwork
+ +
+
+ + + + + + + + +
+ +
Commits
+ +
+
+ + + + + + + + +
+ +
Website
+ +
+
+
+ + + + + + + +
+ +
#ufoai
+ +
+
+ + + + + + + + +
+ +
Lix
+ +
+
+
+ + + + + + + + + + + + + +
Engines
+ + + + + + + + +
+ +
Haskell roguelike Allure of the Stars and its engine LambdaHack
+ +
+
+ + + + + + + +
+ +
#ryzom
+ +
+
+ + + + + + + + +
+ +
openage
+ +
+
+ + + + + + + + + + + + +
CorsixTH
+ + + + + + + + +
+ +
CorsixTH General
+ +
+
+ + + + + + + + +
+ +
CorsixTH Community Content
+ +
+
+ + + + + + + + +
+ +
CorsixTH Technical
+ +
+
+ + + + + + + + +
+ +
CorsixTH Announcements
+ +
+
+ + + + + + + + +
+ +
CorsixTH Help
+ +
+
+
+ + + + + + + + + + + + + + + + +
Godot
+ + + + + + + + +
+ +
Godot Unmoderated
+ +
+
+ + + + + + + + +
+ +
French Godot
+ +
+
+ + + + + + + + +
+ +
Godot Italia
+ +
+
+ + + + + + + +
+ +
German Godot
+ +
+
+ + + + + + + + +
+ +
Godot Engine
+ +
+
+ + + + + + + +
+ +
Japanese Godot
+ +
+
+ + + + + + + + +
+ +
Godot Latino
+ +
+
+ + + + + + + + +
+ +
godot-haskell
+ +
+
+ + + + + + + + + + + + +
SimulaVR
+ + + + + + + +
+ +
Wayland with Godot
+ +
+
+ + + + + + + + +
+ +
SimulaVR
+ +
+
+ + + + + + + + +
+ +
godot-haskell
+ +
+
+ + + + + + + + +
+ +
Godot Engine
+ +
+
+ + + + + + + + +
+ +
Nix Haskell
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
OpenMW
+ + + + + + + +
+ +
OpenMW Troubleshooting
+ +
+
+ + + + + + + +
+ +
OpenMW Funposting
+ +
+
+ + + + + + + + +
+ +
OpenMW Development
+ +
+
+ + + + + + + +
+ +
OpenMW Offtopic
+ +
+
+ + + + + + + +
+ +
OpenMW Screenshots
+ +
+
+ + + + + + + +
+ +
OpenMW Modding
+ +
+
+ + + + + + + +
+ +
OpenMW Русский
+ +
+
+ + + + + + + +
+ +
OpenMW Shaders
+ +
+
+ + + + + + + + +
+ +
OpenMW
+ +
+
+ + + + + + + +
+ +
OpenMW CS
+ +
+
+ + + + + + + +
+ +
OpenMW Lua
+ +
+
+ + + + + + + +
+ +
OpenMW Example Suite
+ +
+
+ + + + + + + +
+ +
OpenMW Deutsch
+ +
+
+ + + + + + + +
+ +
OpenMW Français
+ +
+
+ + + + + + + +
+ +
OpenMW Skandinaviskt
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + +
Communities
+ + + + + + + + +
+ +
Libre Game Night
+ +
+
+ + + + + + + +
+ +
#libreplanet-gaming
+ +
+
+ + + + + + + +
+ +
smac@conference.bitcheese.net
+ +
+
+ + + + + + + + + +
Opensource_gaming
+ + + + + + + + +
+ +
Welcome/Rules
+ +
+
+ + + + + + + + +
+ +
General
+ +
+
+
+ + + + + + + +
+ +
Free, Libre, and Open Source Gaming
+ +
+
+ + + + + + + + +
+ +
wtactics
+ +
+
+ + + + + + + + +
Open-Source-RTS-Xmas-party-Invite
+ + + + + + + + +
+ +
Welcome and when to we meet :)
+ +
+
+
+ + + + + + + + +
+ +
FreeGameDev.net general chat
+ +
+
+ + + + + + + +
+ +
LibreGamingClub
+ +
+
+ + + + + + + + + + + +
LibreGaming Community
+ + + + + + + + +
+ +
Matchmaking
+ +
+
+ + + + + + + + +
+ +
Organisation
+ +
+
+ + + + + + + + +
+ +
Offtopic
+ +
+
+ + + + + + + + +
+ +
Workshop
+ +
+
+
+ + + + + + + +
+ +
onfoss@conference.hribhrib.at
+ +
+
+ + + + + + + + + + + +
onFOSS-LAN
+ + + + + + + +
+ +
General
+ +
+
+ + + + + + + +
+ +
Offtopic
+ +
+
+ + + + + + + +
+ +
Organisation
+ +
+
+ + + + + + + +
+ +
onfoss@conference.hribhrib.at
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
Historical
+ + + + + + + +
+ +
#libregamenight
+ +
+
+ + + + + + + +
+ +
Libre Game Night
+ +
+
+ + + + + + + +
+ +
#libreplanet-gaming
+ +
+
+ + + + + + + +
+ +
#freegamer
+ +
+
+ + + + + + + +
+ +
#corsix-th
+ +
+
+ + + + + + + +
+ +
#unknown-horizons
+ +
+
+ + + + + + + +
+ +
#ryzom@irc.freegamedev.net
+ +
+
+ + + + + + + +
+ +
#libregamewiki
+ +
+
+ + + + + + + + +
+ +
SuperTuxKart (STK)
+ +
+
+ + + + + + + + +
+ +
0 AD Central
+ +
+
+ + + + + + + +
+ +
#general@irc.freegamedev.net
+ +
+
+ + + + + + + +
+ +
Website
+ +
+
+ + + + + + + +
+ +
Sysadmin
+ +
+
+
+ + + + + + + + + + +
Tools
+ + + + + + + + +
+ +
Highscore
+ +
+
+ + + + + + + + +
+ +
Arcadia / Athenaeum / LibreSteam
+ +
+
+ + + + + + + +
+ +
#libregamewiki
+ +
+
+
+
diff --git a/script.py b/script.py index 55d8c1e..e384849 100755 --- a/script.py +++ b/script.py @@ -9,25 +9,34 @@ def mxc2url(mxc): mediaId = mxc.split('/')[3] return "https://matrix.org/_matrix/media/v3/download/" + serverName + "/" + mediaId -def render(spaces, template): +def render(spaces, loops, template): appTemplate = Template(filename=template) - print(appTemplate.render(s=spaces)) + print(appTemplate.render(s=spaces,loops=loops)) -def make_hierarchy(room, loops, depth=0): +def make_hierarchy(space, room, loops): try: - print(' ' * depth + '- ' + room['name']) - if room['children_state'] and room['room_id'] not in loops: - for child in room['children_state']: - make_hierarchy(ROOMS[child['state_key']], loops, depth+1) + if 'children' in space: + space['children'].append(room) + else: + space['children'] = [room] + if 'children_state' in room: + for child in room['children_state']: + if ROOMS[child['state_key']]['room_id'] not in loops: + make_hierarchy(room,ROOMS[child['state_key']], loops) except: - # missing or no name - print(' ' * depth + ' Skip ' + room['room_id']) + pass if __name__ == '__main__': with open('libregamingspaces.json') as f: data = json.load(f) - # render(data, './spaces.html') ROOMS = {room['room_id'] : room for room in data} - make_hierarchy(ROOMS['!IdUUdKALNzBLKEjvbP:matrix.org'], ['!JTpfWshTKZpZiUASvP:hacklab.fi']) + spaces={'name':"TOP"} + loops=['!JTpfWshTKZpZiUASvP:hacklab.fi'] + make_hierarchy(spaces,ROOMS['!IdUUdKALNzBLKEjvbP:matrix.org'], loops) + #print(spaces) + render(spaces, loops, './spaces.html') + + + diff --git a/spaces.html b/spaces.html index 118b0b3..6905011 100644 --- a/spaces.html +++ b/spaces.html @@ -10,18 +10,19 @@ - <%def name="render(space)"> + <%def name="render(room)"> - % for room in space: % if 'avatar_url' in room: % endif - % if 'room_type' in room and room['room_type'] == "m.space": - + % if 'children' in room: + - + % for subroom in room['children']: + + % endfor % else: % if 'room_id' in room: @@ -35,7 +36,6 @@ % endif % endif - % endfor
Subspace: ${room['name']}
${room['name']}
${render(room['children_state'])}
${render(subroom)}