Commit Graph

10 Commits

Author SHA1 Message Date
Phil Morrell c61f0ce372
Merge branch 'wip'
* no real conflicts, just an additional function for script.py
2022-04-17 18:10:17 +01:00
Phil Morrell a343353aa0
generate list.html 2022-04-17 18:09:37 +01:00
Rampoina 2f626d7982 Add avatars and urls 2022-04-17 17:56:33 +02:00
Phil Morrell a0ff199506
transform the API json into a usable datastructure
* index by room_id and recursively build the Space hierarchy
* not proper tail recursion, and uses a global variable for now
* FlightGear Republic is both child and parent of FlightGear and JSBSim
* as proof of concept, print out the room name at correct depth
2022-04-17 14:27:35 +01:00
Phil Morrell e451a10bf3
refactor python to support multiple actions
* executable, license header
* prefer `with open` style to auto-close file handles
* keep hardcoding within __main__
2022-04-17 14:14:22 +01:00
Phil Morrell 585fde2898
update spaces json from matrix-client.matrix.org 2022-04-17 13:55:52 +01:00
Phil Morrell f103ce8649
update spaces json from API
* paginated, append `&from=$FROM` and repeat until "null"

    SPACE='!IdUUdKALNzBLKEjvbP:matrix.org'
    URL="https://freedombox.emorrp1.name/_matrix/client/unstable/org.matrix.msc2946/rooms/$SPACE/hierarchy?access_token=$TOKEN"
    FROM=$(curl "$URL" | tee -a hierarchy.json | jq -r .next_batch); echo $FROM
    jq -s 'map(.rooms) | add' hierarchy.json > libregamingspaces.json
2022-02-12 15:09:53 +00:00
Rampoina 9fc2bcc671 Add license comment 2022-01-16 20:18:13 +01:00
Rampoina 775b89bd09 Add script 2022-01-16 20:14:03 +01:00
Rampoina 3b49038034 first commit 2022-01-15 14:40:52 +01:00