From 8958969e0ee86b59903137f8b4dd2745b7c45be8 Mon Sep 17 00:00:00 2001 From: Jan Jambor Date: Wed, 30 Oct 2024 22:02:36 +0100 Subject: [PATCH] update: Add better command to document git repo structure with git ls-tree. --- documentation-guidelines.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/documentation-guidelines.md b/documentation-guidelines.md index 53ca485..7619129 100644 --- a/documentation-guidelines.md +++ b/documentation-guidelines.md @@ -37,15 +37,23 @@ drawio -x -f png -b 10 -o .png .drawio If you want to add an optional folder structure to your documentation, you can use the following command to generate a tree-like structure. ```bash -find . -type d ! -path '*/.*' | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/" +git ls-tree -r --name-only HEAD | sed 's|[^/]*| &|g' ``` Example output: ```text - |-resources - | |-images - | |-diagrams - | |-scripts - |-know-how + Dockerfile + maus_helper.sh + maus_loader.yml + requirements.txt + setup.py + src/ __init__.py + src/ logging_config/ __init__.py + src/ logging_config/ config.py + src/ maus_loader.py + src/ scraper/ __init__.py + src/ scraper/ scraper.py + tests/ __init__.py + tests/ test_scraper.py ```