TreeMaker is a Python tool that allows you to create a directory structure and files from a specified tree format. The tool parses the input tree structure and generates the corresponding directories and files in the specified output location.
- Create directories and files based on a tree structure defined in a text file.
- Customizable symbols for tree structure representation.
- Error handling for invalid paths and file creation issues.
- Command-Line Interface (CLI) for easy usage.
To use TreeMaker, you can clone the repository and install the required dependencies.
git clone https://github.com/okpalan/treemaker.git
cd treemaker
pip install -r requirements.txtAfter installing, you can run the TreeMaker tool from the command line with the following command:
python treemaker.py --input path/to/tree_structure.txt --output path/to/output_directoryYour input file should contain a tree structure formatted like this:
├── directory1
│ ├── subdirectory1
│ └── file1.txt
└── directory2
└── file2.txt
You can also specify content for files in the tree structure by including a colon (:) followed by the content, like so:
├── directory1
│ ├── subdirectory1
│ └── file1.txt: This is the content of file1.
└── directory2
└── file2.txt: This is the content of file2.
TreeMaker includes error handling for common issues, such as:
- Invalid paths (e.g., directories with illegal characters)
- File creation failures (e.g., permission issues)
- Duplicate directory and file names
Contributions are welcome! If you have suggestions for improvements or have found bugs, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
- Thanks to the open-source community for their contributions and support.