GGTree is a simple Python program that outputs the directory structure (tree) from the current folder to the console.
Go to file
2025-01-03 08:10:38 +01:00
ggtree.py Add files via upload 2024-11-28 14:26:39 +01:00
install.bat update for windows isntall and uninstall 2024-12-31 09:48:39 +01:00
install.sh Add files via upload 2024-11-28 14:26:39 +01:00
LICENSE Initial commit 2024-11-28 14:21:02 +01:00
README.md no message 2025-01-03 08:10:38 +01:00
uninstall.bat update for windows isntall and uninstall 2024-12-31 09:48:39 +01:00
uninstall.sh Add files via upload 2024-11-28 14:26:39 +01:00

GGTree

GGTree is a simple Python program that displays the directory structure (a tree) starting from the current directory in your console.

Example

User: /python/tree$ ggtree
Directory tree for: /python/tree
├── README.md
├── README.md~
├── TestFolder1
│   └── test.txt
├── ggtree.py
├── install.sh
└── uninstall.sh
User: /python/tree$

Features

  • Provides a clear tree visualization of all files and subdirectories.
  • Runs directly from the current directory.
  • Easy to install and uninstall.

Prerequisites

  • Python 3 must be installed on your system.

Installation (Linux/macOS)

  1. Download the files ggtree.py, install.sh, and uninstall.sh.
  2. Navigate to the directory where these files are located.
  3. Ensure the scripts have the correct permissions:
    chmod +x install.sh uninstall.sh
    
  4. Run the installation script:
    sudo ./install.sh
    

    Note

    : Using sudo may be required to place files in global directories and possibly adjust the PATH environment variable.

After the installation, you can run ggtree from any directory in a new terminal window.


Installation (Windows)

  1. Make sure Python 3 is installed and added to your system PATH.
  2. Download the files ggtree.py, install.bat, and uninstall.bat.
  3. Double-click (or run in Command Prompt) install.bat:
    • This script copies ggtree.py and creates a wrapper batch file ggtree.bat in
      %USERPROFILE%\AppData\Local\Programs\ggtree.
    • It then updates your PATH environment variable so you can run ggtree from anywhere.
  4. Open a new Command Prompt or PowerShell window so that the updated PATH variable is recognized.

Note

: If you prefer a custom location, adjust the script and manually configure your PATH environment variable accordingly.


Usage

Linux/macOS

Simply open a terminal and run:

ggtree

The program will display the directory structure starting from your current folder.

Windows

  • If you used install.bat and have opened a new terminal window, you can directly run:
    ggtree
    
  • If you did not install or its not in the PATH:
    python ggtree.py
    
    (In this case, you must be in the same directory as ggtree.py, or specify the full path.)

Uninstallation

Linux/macOS

  1. Run the uninstall.sh script:
    sudo ./uninstall.sh
    
  2. This removes the program and any related files (including symlinks/entries in your system paths).

Windows

  1. Double-click (or run) uninstall.bat:
    • This script deletes ggtree.py and the ggtree.bat file from
      %USERPROFILE%\AppData\Local\Programs\ggtree.
    • It then tries to remove that entire directory.
  2. Note: This does not automatically remove the entry from the PATH environment variable.
    If you want a fully cleaned environment, you must manually remove the corresponding entry from your PATH or modify the script to do so.

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE. See the LICENSE file for more details.


Enjoy using GGTree!