This project is a Python script that generates a JSON file with the tree structure of a folder or creates folders and files from a JSON file. It works with all types of directories and files.
Media and binary files are base64 encoded in the JSON file to ensure correct generation of directories from the JSON.
The project does not have any external dependencies and uses only the libraries included by default in Python.
Open the binary in your terminal or cmd
(Windows)
tree_maker.exe -g <folder_path> # Generate json
tree_maker.exe -c <input_file.json> # Create tree (folders and files)
(OSX)
tree_maker_osx_v1 -g <folder_path> # Generate json
tree_maker_osx_v1 -c <input_file.json> # Create tree (folders and files)
(Linux)
tree_maker_lin_v1 -g <folder_path> # Generate json
tree_maker_lin_v1 -c <input_file.json> # Create tree (folders and files)
-
Clone the repository:
git clone https://github.com/flowese/tree_maker.git
-
Navigate to the project directory:
cd tree_maker
To generate a JSON file with the tree structure of a folder, run the following command:
python tree_maker.py generate <folder_path>
To create folders and files from a JSON file, run the following command:
python tree_maker.py create <input_file.json>
To generate a JSON file with the tree structure of the current directory, run the following command:
python tree_maker.py generate .
To create folders and files from a JSON file, run the following command:
python tree_maker.py create example.json
This project is licensed under the MIT License - see the LICENSE file for details.