ggtree.py | ||
install.sh | ||
LICENSE | ||
README.md | ||
uninstall.sh |
GGTree
GGTree is a simple Python program that outputs the directory structure (tree) from the current folder to the console.
Sample
[14:22:05] User: /python/tree$ ggtree
Directory tree for: /python/tree
├── README.md
├── README.md~
├── TestFolder1
│ └── test.txt
├── ggtree.py
├── install.sh
└── uninstall.sh
[14:22:07] User: /python/tree$
Features
- Lists all files and directories in a clear tree structure.
- Works from the current directory.
- Easy to install and uninstall.
Prerequisites
- Python 3 must be installed on your system.
Installation
- Download the files
GGTree.py
,install.sh
, anduninstall.sh
. - Navigate to the directory where these files are located.
- Ensure the installation script has the correct permissions. If not, run the following command:
chmod +x install.sh uninstall.sh
- Run the installation script:
sudo ./install.sh
After installation, you can execute the program using the command ggtree
from anywhere in the terminal.
Optional: Use a Virtual Environment
To avoid conflicts with system-wide Python packages, consider running the program inside a virtual environment:
- Create a virtual environment:
python3 -m venv ggtree_env
2. Activate the virtual environment:
- On Linux/macOS:
source ggtree_env/bin/activate
- On Windows:
ggtree_env\Scripts\activate
3. Install any dependencies (if required) within the virtual environment.
Usage
Simply run the following command in the terminal:
ggtree
The program will display the entire directory structure starting from the current folder.
Uninstallation
- Run the uninstallation script:
sudo ./uninstall.sh
This will completely remove the program.
windows User
Installation on Windows
- Ensure Python 3 is installed on your system and added to the PATH environment variable.
- Download the file
ggtree.py
and place it in a directory of your choice. - (Optional) To use GGTree system-wide, add the directory containing
ggtree.py
to your PATH environment variable:- Open the Start Menu and search for "Environment Variables".
- Click on "Edit the system environment variables".
- Under "System Properties", click "Environment Variables".
- In the "System Variables" section, find and select the "Path" variable, then click "Edit".
- Click "New" and add the full path to the directory containing
ggtree.py
. Click "OK" to save.
Usage on Windows
- Open the Command Prompt or PowerShell.
- Navigate to the directory where
ggtree.py
is located, or ensure it is in the PATH for system-wide usage. - Run the program using the command:
python ggtree.py
- If
ggtree.py
is in your PATH, you can directly use:ggtree
- If
The program will display the directory structure starting from the current folder.
License
This project is licensed under the GNU GENERAL PUBLIC LICENSE. See the LICENSE
file for more details.
Enjoy using GGTree!