This script automates the creation of folders based on a defined folder structure specified in a YAML file. It creates folders recursively, adds a README.md file with the folder's title and description, and supports optional parameters for customizing the output location.
- Creates folders according to a defined folder structure
- Supports recursive folder creation
- Adds a README.md file with the title and description to each folder
- Optional test parameter to create folders in a unique subfolder
- Customizable target location parameter
To use this script, follow the instructions below:
- Python 3 installed on your system
- YAML library (
pyyaml
) installed (you can install it usingpip install pyyaml
)
- Clone the repository or download the script file (
make.py
) to your local machine.
-
Prepare a YAML file (
structure.yaml
) to define the folder structure. See the provided example file for reference. -
Open a terminal or command prompt.
-
Navigate to the directory where the
make.py
script is located. -
Run the script with the following command:
python3 make.py [target_directory]
- If you provide the
target_directory
parameter, the folders will be created in the specified location. If the parameter is not provided, the folders will be created in the current directory. - To create the folders in a unique subfolder (for testing purposes), use the
test
parameter:python3 make.py test
- If you provide the
A: To modify the folder structure, open the structure.yaml
file and update it according to your requirements. The structure follows a hierarchical format using YAML syntax.
A: Yes, you can specify the target directory where the folders will be created by providing it as a parameter when running the script. If no parameter is provided, the script will create the folders in the current directory.
A: You can use the test
parameter when running the script. This will create a unique subfolder and create the folders inside it, allowing you to test the functionality without modifying your current directory.
A: If you'd like to contribute to this project, you can fork the repository, make your desired changes, and submit a pull request. Your contributions are highly appreciated!
This project is licensed under the MIT License.