mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-02-11 09:39:03 +01:00
fix: move tree.json output to parent folder
Signed-off-by: Bjorn Lammers <bjorn@lammers.media>
This commit is contained in:
parent
118b13aac3
commit
a0fddd586c
@ -27,11 +27,11 @@ if __name__ == "__main__":
|
|||||||
# Generate the combined folder tree
|
# Generate the combined folder tree
|
||||||
folder_tree = generate_folder_tree(folder_paths)
|
folder_tree = generate_folder_tree(folder_paths)
|
||||||
|
|
||||||
# Write the JSON structure to 'tree.json' in the root folder
|
# Write the JSON structure to 'tree.json' in the parent folder
|
||||||
root_dir = Path(__file__).resolve().parent
|
root_dir = Path(__file__).resolve().parent
|
||||||
tree_json_path = root_dir / 'tree.json'
|
tree_json_path = root_dir.parent / 'tree.json'
|
||||||
|
|
||||||
with open(tree_json_path, 'w') as f:
|
with open(tree_json_path, 'w') as f:
|
||||||
json.dump(folder_tree, f, indent=4, sort_keys=True) # Sort the keys in the JSON output
|
json.dump(folder_tree, f, indent=4, sort_keys=True) # Sort the keys in the JSON output
|
||||||
|
|
||||||
print(f"Folder tree successfully written to '{tree_json_path}'.")
|
print(f"Folder tree successfully written to '{tree_json_path}'.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user