mirror of
https://github.com/Gerald-Ha/GGTree.git
synced 2025-04-21 05:13:21 +00:00
Update README.md
This commit is contained in:
parent
a2e1ea0cf8
commit
abedc9ad46
57
README.md
57
README.md
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# GGTree
|
# GGTree
|
||||||
|
<br><br>
|
||||||
GGTree is a simple Python program that outputs the directory structure (tree) from the current folder to the console.
|
GGTree is a simple Python program that outputs the directory structure (tree) from the current folder to the console.
|
||||||
|
|
||||||
## Sample
|
## Sample
|
||||||
@ -16,15 +16,16 @@ Directory tree for: /python/tree
|
|||||||
└── uninstall.sh
|
└── uninstall.sh
|
||||||
[14:22:07] User: /python/tree$
|
[14:22:07] User: /python/tree$
|
||||||
```
|
```
|
||||||
|
<br><br>
|
||||||
|
<br><br>
|
||||||
## Features
|
## Features
|
||||||
- Lists all files and directories in a clear tree structure.
|
- Lists all files and directories in a clear tree structure.
|
||||||
- Works from the current directory.
|
- Works from the current directory.
|
||||||
- Easy to install and uninstall.
|
- Easy to install and uninstall.
|
||||||
|
<br><br>
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
- **Python 3** must be installed on your system.
|
- **Python 3** must be installed on your system.
|
||||||
|
<br><br>
|
||||||
## Installation
|
## Installation
|
||||||
1. Download the files `GGTree.py`, `install.sh`, and `uninstall.sh`.
|
1. Download the files `GGTree.py`, `install.sh`, and `uninstall.sh`.
|
||||||
2. Navigate to the directory where these files are located.
|
2. Navigate to the directory where these files are located.
|
||||||
@ -36,42 +37,78 @@ Directory tree for: /python/tree
|
|||||||
```bash
|
```bash
|
||||||
sudo ./install.sh
|
sudo ./install.sh
|
||||||
```
|
```
|
||||||
|
<br><br>
|
||||||
|
<br><br>
|
||||||
After installation, you can execute the program using the command `ggtree` from anywhere in the terminal.
|
After installation, you can execute the program using the command `ggtree` from anywhere in the terminal.
|
||||||
|
<br><br>
|
||||||
### Optional: Use a Virtual Environment
|
### Optional: Use a Virtual Environment
|
||||||
To avoid conflicts with system-wide Python packages, consider running the program inside a virtual environment:
|
To avoid conflicts with system-wide Python packages, consider running the program inside a virtual environment:
|
||||||
1. Create a virtual environment:
|
1. Create a virtual environment:
|
||||||
```bash
|
```bash
|
||||||
python3 -m venv ggtree_env
|
python3 -m venv ggtree_env
|
||||||
```
|
```
|
||||||
|
<br><br>
|
||||||
2. Activate the virtual environment:
|
2. Activate the virtual environment:
|
||||||
- On Linux/macOS:
|
- On Linux/macOS:
|
||||||
```bash
|
```bash
|
||||||
source ggtree_env/bin/activate
|
source ggtree_env/bin/activate
|
||||||
```
|
```
|
||||||
|
<br><br>
|
||||||
- On Windows:
|
- On Windows:
|
||||||
```bash
|
```bash
|
||||||
ggtree_env\Scripts\activate
|
ggtree_env\Scripts\activate
|
||||||
```
|
```
|
||||||
|
<br><br>
|
||||||
|
<br><br>
|
||||||
3. Install any dependencies (if required) within the virtual environment.
|
3. Install any dependencies (if required) within the virtual environment.
|
||||||
|
<br><br>
|
||||||
## Usage
|
## Usage
|
||||||
Simply run the following command in the terminal:
|
Simply run the following command in the terminal:
|
||||||
```bash
|
```bash
|
||||||
ggtree
|
ggtree
|
||||||
```
|
```
|
||||||
|
<br><br>
|
||||||
|
<br><br>
|
||||||
The program will display the entire directory structure starting from the current folder.
|
The program will display the entire directory structure starting from the current folder.
|
||||||
|
<br><br>
|
||||||
## Uninstallation
|
## Uninstallation
|
||||||
1. Run the uninstallation script:
|
1. Run the uninstallation script:
|
||||||
```bash
|
```bash
|
||||||
sudo ./uninstall.sh
|
sudo ./uninstall.sh
|
||||||
```
|
```
|
||||||
|
<br><br>
|
||||||
This will completely remove the program.
|
This will completely remove the program.
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
# windows User
|
||||||
|
|
||||||
|
### Installation on Windows
|
||||||
|
|
||||||
|
1. Ensure **Python 3** is installed on your system and added to the PATH environment variable.
|
||||||
|
2. Download the file `ggtree.py` and place it in a directory of your choice.
|
||||||
|
3. (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.
|
||||||
|
<br><br>
|
||||||
|
### Usage on Windows
|
||||||
|
1. Open the Command Prompt or PowerShell.
|
||||||
|
2. Navigate to the directory where `ggtree.py` is located, or ensure it is in the PATH for system-wide usage.
|
||||||
|
3. Run the program using the command:
|
||||||
|
```cmd
|
||||||
|
python ggtree.py
|
||||||
|
```
|
||||||
|
- If `ggtree.py` is in your PATH, you can directly use:
|
||||||
|
```cmd
|
||||||
|
ggtree
|
||||||
|
```
|
||||||
|
<br><br>
|
||||||
|
The program will display the directory structure starting from the current folder.
|
||||||
|
<br><br>
|
||||||
## License
|
## License
|
||||||
This project is licensed under the **GNU GENERAL PUBLIC LICENSE**. See the `LICENSE` file for more details.
|
This project is licensed under the **GNU GENERAL PUBLIC LICENSE**. See the `LICENSE` file for more details.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user