This is a command-line application that dynamically generates the project structure into a structure.md
file for user's README.md
.
.
├── test
│ ├── utils_args_check_test.go
│ └── utils_func_test.go
├── types
│ └── directory.go
├── utils
│ ├── args_check.go
│ ├── config.go
│ └── func.go
├── README.md
├── go.mod
├── main.go
└── structure.md
To install this application:
git clone https://github.com/sennett-lau/readme-project-structure-generator-go.git
cd readme-project-structure-generator-go
make install
To use this application, simply run the following command at the root of your project and a structure.md
file will be generated.
rpsg
For help, you can run the following command:
rpsg --help
or
rpsg -h
There are some default ignored files which located at config/GetDefaultIgnoreList
including:
.git
.gitignore
.idea
.vscode
node_modules
vendor
*.exe
*.dll
*.so
*.dylib
*.min.js
*.min.css
*.min.html
*.min.json
*.min.xml
venv
__pycache__
- *.pyc
There are more available options for users to customize the output of the structure.md
file.
--help
/-h
--extend-ignore-list
/-e
--max-depth
/-d
--show-ignore-list
/-s
The --help
option allows users to show the help message.
rpsg --help
or with the short option:
rpsg -h
The --extend-ignore-list
option allows users to add more ignored files to the default ignored list.
For example, if you want to add .DS_Store
and .gitkeep
to the ignored list, you can run the following command:
rpsg --extend-ignore-list=.DS_Store,.gitkeep
The --max-depth
option allows users to set the maximum depth of the file structure, while the default value is 6
and the allowed range is from 1
to 10
// the default maximum depth of 6, as shown below:
.
├── 1
│ └── 2
│ └── 3
│ └── 4
│ └── 5
│ └── 6
│ └── ...
└── ...
For example, if you want to set the maximum depth to 3
, you can run the following command:
rpsg --max-depth=3
output:
.
├── 1
│ └── 2
│ └── 3
│ └── ...
└── ...
The --show-ignore-list
option allows users to show the default ignored files in the structure.md
file and will NOT generate the file structure.
For example, if you want to show the default ignored files, you can run the following command:
rpsg --show-ignore-list
output:
Ignore list:
.git
.gitignore
...
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a pull request
This library is licensed under the MIT License. See the LICENSE file