1
0
Fork 0
mirror of https://codeberg.org/june64/mrvc.git synced 2026-01-10 16:06:33 +01:00

introduce option for JSON output

Also rename printHomeserverMemberCount option accordingly to fit new
output type.
This commit is contained in:
June 2025-08-19 21:21:39 +02:00
commit 4964485d29
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0
6 changed files with 67 additions and 20 deletions

View file

@ -43,5 +43,9 @@ func main() {
roomInfoTree := roominfotree.Get(config.Rooms, config.Recursive, config.RecursionMaxDepth, config.RecursionSuggestedOnly, client, federationClient)
output.Print(roomInfoTree, config.PrintHomeserverMemberCount)
if config.JSON {
output.PrintJSON(roomInfoTree, config.OutputHomeserverMemberCount)
} else {
output.Print(roomInfoTree, config.OutputHomeserverMemberCount)
}
}