RepoTree is a Python script that generates and displays the directory structure of any GitHub repository in a tree view format.
- Fetch Repository Structure: Retrieves the directory and file structure of a GitHub repository using the GitHub API.
- Tree View Format: Displays the repository structure in an easy-to-read tree view format.
- Rate Limiting Handling: Automatically handles rate limiting and retries requests.
- Error Handling: Provides error handling for invalid repository names and unexpected response formats.
- Python 3.7 or higher
requestslibrary
-
Clone the repository:
git clone https://github.com/Cantue35/RepoTree.git cd RepoTree -
(Optional) Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install requests
Run the script and input the GitHub repository URL or author/repo format when prompted:
python repo_tree.pyEnter the GitHub repository URL or author/repo: Cantue35/RepoTree
The script will display the directory structure in a tree view format.
RepoTree/
├── LICENSE
├── README.md
├── repo_tree.py
Contributions are welcome! Please open an issue or submit a pull request if you have any suggestions or improvements.
This project is licensed under the MIT License. See the LICENSE file for details.