|
1 | 1 | # Directory Structure Exporter |
| 2 | + |
| 3 | +This repository houses a collection of Python scripts designed to create a tree-like structure of a project directory. Initially inspired by the need to document the structure of an ASP.NET Core project, these scripts are highly versatile and can be adapted for various types of directories/projects by adjusting the folders and file types to include or exclude. |
| 4 | + |
| 5 | +## Scripts Overview |
| 6 | + |
| 7 | +- `directory_structure_exporter_interactive.py`: This script interacts with the user to specify both the project folder path and the output file path, offering a highly customizable experience. |
| 8 | +- `directory_structure_exporter_hardcoded.py`: Uses predefined paths for both the project directory and the output file, eliminating the need for user input and streamlining the process for consistent usage scenarios. |
| 9 | +- `directory_structure_exporter_autopath.py`: Determines the output file path based on the script's current location, simplifying execution by removing the need for manual path specification. |
| 10 | + |
| 11 | +## Key Features |
| 12 | + |
| 13 | +- **Flexibility in Customization**: Tailor the script to your project by specifying which directories to ignore (e.g., `.git`, `.vs`, `bin`) and which file extensions to include (e.g., `.cs`, `.html`, `.css`), among others. |
| 14 | +- **Adaptable Output Options**: Depending on the script variant used, the project structure can be output to a user-defined location, a hardcoded path, or a path relative to the script itself. |
| 15 | +- **User-friendly Design**: With clear instructions and error handling, the scripts are designed to be accessible to users of varying skill levels. |
| 16 | + |
| 17 | +## Usage Instructions |
| 18 | + |
| 19 | +### For the Interactive Script |
| 20 | + |
| 21 | +1. Execute the script using a terminal or command prompt. |
| 22 | +2. Follow the prompts to enter the path of your project folder and the desired output file location. If a directory is specified for the output, you will be asked to name the output `.txt` file. |
| 23 | +3. The script will then generate a text file at the chosen location, detailing your project's directory structure. |
| 24 | + |
| 25 | +### For Hardcoded or Autopath Scripts |
| 26 | + |
| 27 | +Execute the desired script directly. There's no need for user input; the output path is either predetermined or calculated automatically. |
| 28 | + |
| 29 | +## Customization |
| 30 | + |
| 31 | +Adjust the `excluded_dirs` and `included_file_extensions` sets within the script to change which directories are skipped and which file types are included in the output. |
| 32 | + |
| 33 | +## System Requirements |
| 34 | + |
| 35 | +- Python 3.6 or later |
| 36 | +- No external dependencies are required. |
| 37 | + |
| 38 | +## Example Output |
| 39 | + |
| 40 | +The scripts produce a text file that visually represents your project's directory structure in a hierarchical format, akin to a tree view. |
| 41 | + |
| 42 | +## Contribution Guidelines |
| 43 | + |
| 44 | +Contributions to improve or enhance the scripts are welcome. Feel free to fork this repository and submit pull requests with your suggested changes or fixes. |
| 45 | + |
| 46 | +## License |
| 47 | + |
| 48 | +This project is released under the MIT License. For more details, see the LICENSE file included in the repository. |
0 commit comments