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.3.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file pygentree-1.0.3.tar.gz
.
File metadata
- Download URL: pygentree-1.0.3.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 910824e26d8342f409deab3fd80a16875028b3e37d44264f4568e6a86b2c4fd1 |
|
MD5 | 8d36281e2a7154837a748f0379b22303 |
|
BLAKE2b-256 | e522fe113c3d1e50bfcd93847a9347e403f3ae15457bc48fe673aa29fa7db6b2 |
File details
Details for the file pygentree-1.0.3-py2.py3-none-any.whl
.
File metadata
- Download URL: pygentree-1.0.3-py2.py3-none-any.whl
- Upload date:
- Size: 6.7 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 | 426e918a2bf0c8f4d1c1aebc47365dad2c0b6fcb732fe18f2d51f6e9f726d4b3 |
|
MD5 | 420d2abb133063e2ecd560890b011f30 |
|
BLAKE2b-256 | 3d9c186680c237715118a6951350f4302aedbd340bf171539fcf151c802e2b14 |