Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Add ASCII directory tree visualization script - #130

Draft
justinlietz93 with Copilot wants to merge 3 commits into
mainfrom
copilot/add-repo-tree-script
Draft

Add ASCII directory tree visualization script#130
justinlietz93 with Copilot wants to merge 3 commits into
mainfrom
copilot/add-repo-tree-script

Conversation

Copilot AI commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

Adds repo_tree.py to generate a complete ASCII tree visualization of the repository structure, similar to the tree command.

Implementation

  • Recursive directory traversal using pathlib.Path.iterdir()
  • ASCII box-drawing characters (├──, └──, ) for proper tree formatting
  • Filters hidden entries (names starting with .)
  • Graceful PermissionError handling
  • Directories listed before files, both alphabetically sorted

Usage

python repo_tree.py

Outputs 2933 lines covering the full repository structure:

Prometheus_VDM/
├── Derivation/
│   ├── Agency_Field/
│   │   ├── Coordination_Depth/
│   │   │   └── PROPOSAL_Multipartite_Coordinaton_Depth_v1.md
│   │   ├── Witness/
│   │   │   └── PROPOSAL_Agency_Witness_v1.md
...
Original prompt

Create a Python script that recursively scans the entire repository directory structure and prints a comprehensive ASCII file tree map (similar to the output of the tree command) through every folder and subfolder. The output should match the full layout of the repository. The script should:

  • Run from the root of the repository.
  • Walk through all directories and subdirectories.
  • Output the complete file tree as plain text to stdout.
  • Use ASCII-graphics similar to:
    dirname/
    ├── file1
    └── subdir/
    └── file2
  • Handle arbitrarily nested folders.
  • Ignore hidden files and directories (those starting with a dot).
    Provide this script at the root named: repo_tree.py.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add Python script for comprehensive ASCII file tree map Add ASCII directory tree visualization script Jan 23, 2026
Copilot AI requested a review from justinlietz93 January 23, 2026 21:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants