{"id":21300906,"url":"https://github.com/otthe/readme-directory-tree","last_synced_at":"2025-04-14T18:05:25.363Z","repository":{"id":239071742,"uuid":"798399880","full_name":"otthe/readme-directory-tree","owner":"otthe","description":"Automatically generates and updates directory structure in README.md","archived":false,"fork":false,"pushed_at":"2024-05-11T12:16:53.000Z","size":10,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T18:04:54.331Z","etag":null,"topics":["ci","readme-generator","shell","shell-script"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/otthe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-09T17:42:42.000Z","updated_at":"2025-04-09T10:29:26.000Z","dependencies_parsed_at":"2024-05-11T13:31:54.066Z","dependency_job_id":null,"html_url":"https://github.com/otthe/readme-directory-tree","commit_stats":null,"previous_names":["ottoheiskanen/readme-directory-tree","otthe/readme-directory-tree"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otthe%2Freadme-directory-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otthe%2Freadme-directory-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otthe%2Freadme-directory-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otthe%2Freadme-directory-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otthe","download_url":"https://codeload.github.com/otthe/readme-directory-tree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248933341,"owners_count":21185460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","readme-generator","shell","shell-script"],"created_at":"2024-11-21T15:42:14.359Z","updated_at":"2025-04-14T18:05:25.327Z","avatar_url":"https://github.com/otthe.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# readme-directory-tree\nHelps you to maintain your project's README by automatically providing up-to-date directory structure in a treeview format.\n\n## Features\n- Automatically generates and updates directory structure in a `README.md` file.\n- Configurable maximum depth for directory tree view.\n- Excludes specified directories (e.g., `node_modules`, `.git`).\n- Easy to plug into CI.\n\n## Usage\n1. **Include tags in your `README.md`:**\n    ```bash\n    \u003c!-- TREEVIEW START --\u003e\n    \u003c!-- TREEVIEW END --\u003e\n    ```\n    \n2. **Run `treeview.sh` via CLI or automated action**\n    \u003cbr\u003e\n3. **You should see similar output in your README.md**\n    \u003c!-- TREEVIEW START --\u003e\n    ```bash\n    ├── example-directory/\n    │   ├── build/\n    │   ├── scripts/\n    │   ├── src/\n    │   │   ├── backend/\n    │   │   │   └── server/\n    │   │   └── frontend/\n    │   │       ├── js/\n    │   │       └── styles/\n    │   └── tests/\n    ```\n\n    \u003c!-- TREEVIEW END --\u003e\n\n## Configuration\n- `treeview.sh` accepts three parameters:\n  1. **root directory:** (default: `.`)  \n      Specifies the root directory from which to generate the tree view.\n\n  2. **README.md path:** (default: `README.md` in the current directory)  \n      Path to the `README.md` file where the tree view will be updated.\n\n  3. **maximum depth:** (default: `-1` for unlimited depth)  \n      Sets the maximum depth for directory traversal. For example:\n      - `2` limits the depth to 2 levels.\n      - `-1` means unlimited depth.\n\n    ```bash\n    ./treeview.sh [root_directory] [readme_path] [max_depth]\n    ```\n\n    **Examples:**\n    - Generate a directory tree starting from the current directory and update the local `README.md`:\n      ```bash\n      ./treeview.sh\n      ```\n    - Specify a different root directory:\n      ```bash\n      ./treeview.sh some_directory\n      ```\n    - Specify a different `README.md` file:\n      ```bash\n      ./treeview.sh some_directory /path/to/another/README.md\n      ```\n    - Limit the tree view to a maximum depth of 2:\n      ```bash\n      ./treeview.sh some_directory /path/to/another/README.md 2\n      ```\n\n## Things to consider\nThis script hasn't been tested on macOS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotthe%2Freadme-directory-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotthe%2Freadme-directory-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotthe%2Freadme-directory-tree/lists"}