Skip to content

Commit

Permalink
fix: move tree.json output to parent folder
Browse files Browse the repository at this point in the history
Signed-off-by: Bjorn Lammers <[email protected]>
  • Loading branch information
walkxcode authored Jan 5, 2025
1 parent 118b13a commit a0fddd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/generate_file_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def generate_folder_tree(paths):
# Generate the combined folder tree
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
tree_json_path = root_dir / 'tree.json'
tree_json_path = root_dir.parent / 'tree.json'

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

print(f"Folder tree successfully written to '{tree_json_path}'.")
print(f"Folder tree successfully written to '{tree_json_path}'.")

0 comments on commit a0fddd5

Please sign in to comment.