Folder Organization is a powerful Rust tool designed to generate and maintain README.md files within your project directories.
This script automates the documentation process by detecting subdirectories in a main folder and updating or creating a README.md file in each folder.
Automatically retrieves the list of subdirectories within a specified folder, respecting .gitignore rules.
Creates or updates README.md files for each directory, adding a detailed section on the organization of subdirectories.
If a README.md file already exists, the script looks for a section titled "## Folder organization" and updates it with the latest information. If this section doesn't exist, it is added at the end of the file.
Associates default descriptions with specific folders (docs, src, tests), while allowing custom descriptions for other folders.
Clone this repository to your local machine.
Build the project with Cargo:
cargo build --releaseRun the generated binary, specifying the path to the folder you want to document:
./target/release/folder-organization <your_project_folder>./target/release/folder-organization.exe <your_project_folder>The tool will scan the specified folder, list its subdirectories, and update or create a README.md file in each subdirectory, with a dedicated section for folder organization.
Here's an example of a project structure generated by the tool:
[`📂 src`](src)
> Source code.
[`📂 docs`](docs)
> Documentation.
[`📂 tests`](tests)
> Unit tests.Each subdirectory will have its own README.md file with a "Folder organization" section describing the subfolders it contains.
This project is fully developed in Rust, ensuring optimal performance and safe memory management.