This commit is contained in:
+7
-2
@@ -1,3 +1,4 @@
|
||||
from io import StringIO
|
||||
from rich.console import Console
|
||||
from rich.tree import Tree
|
||||
import json
|
||||
@@ -27,12 +28,16 @@ def main():
|
||||
|
||||
os.makedirs("ci-reports/markdown", exist_ok=True)
|
||||
|
||||
console = Console(record=True, force_terminal=True, color_system="truecolor")
|
||||
buffer = StringIO()
|
||||
console = Console(file=buffer, record=True, force_terminal=True, color_system="truecolor")
|
||||
|
||||
root = Tree(f"📁 {file_path}")
|
||||
build_tree(data, root)
|
||||
|
||||
console.print(root)
|
||||
|
||||
with open("ci-reports/markdown/json-tree-view.txt", "w") as f:
|
||||
f.write(console.export_text(clear=False))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user