BIRDSOpenSource / BIRDSOpenSource/BIRDS3-COM
Add to Organisation structure in readme
- Dominant language
- No language data
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
create a visualisation of organisational structure of this repo similar to the one here
https://github.com/BIRDSOpenSource/BIRDS3-ProceduresAndReports
and add to the Organisation Structure section
my method is a bit long, maybe you can find an alternative
1. install trees in your cli
2. type the following command to print a list of the files in the repo gh api '/repos/BIRDSOpenSource/BIRDS3-COM/git/trees/main?recursive=true' -q '.tree[]|.path'
3. copy list into a blank txt file and save
4. use this python code to display the visualisation of the files
```
import os
# Read paths from a file
with open('b3prpaths.txt', 'r') as f:
paths = [line.strip() for line in f.readlines()]
# Sample list of paths (replace this with the output from your command)
# paths = [
# "src/main/java/com/example/App.java",
# "src/main/resources/config.yml",
# "src/test/java/com/example/AppTest.java",
# "docs/README.md",
# "docs/INSTALL.md"
# ]
def build_tree(paths):
tree = {}
for path in paths:
parts = path.split('/')
current = tree
for part in parts:
if part not in current:
current[part] = {}
current = current[part]
return tree
def print_tree(tree, prefix=''):
keys = sorted(tree.keys())
for index, key in enumerate(keys):
if index == len(keys) - 1:
print(prefix + '└── ' + key)
new_prefix = prefix + ' '
else:
print(prefix + '├── ' + key)
new_prefix = prefix + '│ '
print_tree(tree[key], new_prefix)
# Build the tree from paths
tree = build_tree(paths)
# Print the tree
print_tree(tree)
```
6. copy the results on the CLI and paste in the Organisational structure section (remove specific files, the tree should only show folder levels)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.