A Python package to generate ASCII tree representation of directory structures
Project description
PyGenTree
A Python package to generate ASCII tree representation of directory structures.
Requirements
- Python 3.6 or higher
Installation
pip install pygentree
Usage
# Basic usage (current directory)
pygentree
# Specify a directory
pygentree /path/to/directory
# Limit depth level
pygentree -l 2
# Sort files and folders
pygentree -s asc # ascending order
pygentree -s desc # descending order
pygentree -s standard # default: folders first, then files
# Show only directories
pygentree -d
# Ignore hidden files and directories, e.g. .git, .env, etc.
pygentree --ignore-hidden
# Exclude specific files or directories (comma-separated)
pygentree -e "node_modules,venv,dist"
# Save output to file
pygentree -o tree.txt
# Show version
pygentree -v
# Show help
pygentree -h
Features
- Generate ASCII tree representation of directory structures
- Customize maximum depth level
- Multiple sorting options
- Option to show only directories
- Option to ignore hidden files and directories
- Exclude specific files and directories
- Save output to file
- Handle permission errors gracefully
- Cross-platform compatibility
Supported Python Versions
- Python 3.6
- Python 3.7
- Python 3.8
- Python 3.9
- Python 3.10
- Python 3.11
- Python 3.12
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pygentree-1.0.4.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygentree-1.0.4.tar.gz.
File metadata
- Download URL: pygentree-1.0.4.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b641a8a075eaef2c353102f0707575ca620356165726000d884a40216708266d
|
|
| MD5 |
163677577f70b80c7f8d6ec2435efab3
|
|
| BLAKE2b-256 |
97578e081d9d5676937509c059bd69735ec5bb23982006768a8bec9e297621a5
|
File details
Details for the file pygentree-1.0.4-py2.py3-none-any.whl.
File metadata
- Download URL: pygentree-1.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
381442c30e253d185f10a05e87305c1e9b42ca1caf8100eea28c7abe1cd1d43f
|
|
| MD5 |
103b73b729bf99a8a9a7403ac9e5ffde
|
|
| BLAKE2b-256 |
4f327a35bf049f791d697c412b6329261a6706979bc78a29ec9e3c899212ee2f
|