This commit is contained in:
+3
-4
@@ -26,7 +26,7 @@ def build_tree(data, tree):
|
||||
elif isinstance(data, list):
|
||||
for value in data:
|
||||
if isinstance(value, (dict, list)):
|
||||
branch = tree.add("[bold blue]list[/]")
|
||||
branch = tree.add(f"[bold magenta]-[/]")
|
||||
build_tree(value, branch)
|
||||
else:
|
||||
tree.add(style_value(value))
|
||||
@@ -41,9 +41,8 @@ def main():
|
||||
build_tree(data, root)
|
||||
|
||||
console.print(root)
|
||||
with open("ci-reports/markdown/json-tree-view.log", "w") as f:
|
||||
with open("ci-reports/markdown/json-tree-view.md", "w") as f:
|
||||
f.write(console.export_text(clear=False))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
main()
|
||||
Reference in New Issue
Block a user