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.2.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for pygentree-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c850f07b832ff505d8c579815fe3881146345d1aacf3680d25f02f5dc7d6c8e5 |
|
MD5 | 83373238d49ba4a2ffba09e217af9dc0 |
|
BLAKE2b-256 | fb734645d15355143e1b68bc17e9d9eccc92c776399ef2e8ffbeec66a5c15c3d |