Name | prettree JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | A cross-platform directory tree visualization tool |
upload_time | 2025-01-07 23:07:45 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | None |
keywords |
cli
directory
filesystem
tree
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# PreTree 🌳
[](https://badge.fury.io/py/prettree)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
A cross-platform Python package for visualizing directory structures in a tree-like format.
## Features
- 🖥️ Cross-platform compatibility
- 🌲 Tree-like visualization
- 📊 Configurable depth
- 🔍 Advanced filtering options
- ⚡ Both CLI and library usage
- 📂 Sorted output (directories first)
- 📏 Size-based filtering
- 🎯 Pattern matching
## Installation
```bash
pip install prettree
```
## Usage
### Basic Usage
```bash
# List current directory
prettree
# List specific directory
prettree /path/to/directory
```
### Advanced Options
```bash
# Show hidden files
prettree -a
# Limit depth to 2 levels
prettree -d 2
# Show only files (no directories)
prettree -f
# Show only directories
prettree -D
# Exclude empty directories
prettree -e
# Show only PDF files
prettree -p "*.pdf"
# Exclude configuration files
prettree -x "*.config"
# Show files larger than 1MB
prettree --min-size 1048576
# Show files between 100KB and 1MB
prettree --min-size 102400 --max-size 1048576
```
### As a Python Library
```python
from prettytree import list_directory
# Basic usage
for item in list_directory():
print(item)
# Advanced usage
for item in list_directory(
"/path/to/directory",
max_depth=2,
show_hidden=True,
only_files=True,
file_pattern="*.pdf",
min_size=1048576
):
print(item)
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "prettree",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "cli, directory, filesystem, tree",
"author": null,
"author_email": "Muja Kayadan <mujakayadan@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/8b/c3/2a09bcffd78dafd98582fb2a9e707842ea89f9de4f899f7e0c69e4755504/prettree-0.1.0.tar.gz",
"platform": null,
"description": "# PreTree \ud83c\udf33\n\n[](https://badge.fury.io/py/prettree)\n[](https://opensource.org/licenses/MIT)\n[](https://www.python.org/downloads/)\n\nA cross-platform Python package for visualizing directory structures in a tree-like format.\n\n## Features\n\n- \ud83d\udda5\ufe0f Cross-platform compatibility\n- \ud83c\udf32 Tree-like visualization\n- \ud83d\udcca Configurable depth\n- \ud83d\udd0d Advanced filtering options\n- \u26a1 Both CLI and library usage\n- \ud83d\udcc2 Sorted output (directories first)\n- \ud83d\udccf Size-based filtering\n- \ud83c\udfaf Pattern matching\n\n## Installation\n\n```bash\npip install prettree\n```\n\n## Usage\n\n### Basic Usage\n```bash\n# List current directory\nprettree\n\n# List specific directory\nprettree /path/to/directory\n```\n\n### Advanced Options\n```bash\n# Show hidden files\nprettree -a\n\n# Limit depth to 2 levels\nprettree -d 2\n\n# Show only files (no directories)\nprettree -f\n\n# Show only directories\nprettree -D\n\n# Exclude empty directories\nprettree -e\n\n# Show only PDF files\nprettree -p \"*.pdf\"\n\n# Exclude configuration files\nprettree -x \"*.config\"\n\n# Show files larger than 1MB\nprettree --min-size 1048576\n\n# Show files between 100KB and 1MB\nprettree --min-size 102400 --max-size 1048576\n```\n\n### As a Python Library\n```python\nfrom prettytree import list_directory\n\n# Basic usage\nfor item in list_directory():\n print(item)\n\n# Advanced usage\nfor item in list_directory(\n \"/path/to/directory\",\n max_depth=2,\n show_hidden=True,\n only_files=True,\n file_pattern=\"*.pdf\",\n min_size=1048576\n):\n print(item)\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. \n",
"bugtrack_url": null,
"license": null,
"summary": "A cross-platform directory tree visualization tool",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/mucahitkayadan/prettree",
"Repository": "https://github.com/mucahitkayadan/prettree.git"
},
"split_keywords": [
"cli",
" directory",
" filesystem",
" tree"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "681d6b2708bc923f2111059d8c9f67e9624400355f76655a3af578be0702ddb5",
"md5": "4cdbceff1ff0b42af5bec61f0bc84aa4",
"sha256": "07c4d3974f902ccec8b06ba6314006565d565fa12b5d71286e1920e943e6bf46"
},
"downloads": -1,
"filename": "prettree-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4cdbceff1ff0b42af5bec61f0bc84aa4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 5368,
"upload_time": "2025-01-07T23:07:42",
"upload_time_iso_8601": "2025-01-07T23:07:42.402245Z",
"url": "https://files.pythonhosted.org/packages/68/1d/6b2708bc923f2111059d8c9f67e9624400355f76655a3af578be0702ddb5/prettree-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8bc32a09bcffd78dafd98582fb2a9e707842ea89f9de4f899f7e0c69e4755504",
"md5": "57902f71f429babf4c6701b54c1a3e88",
"sha256": "bfdbcc7e354a81ec7efa3ecb7e232ca53cce18746b6ef8acd34f2b6b2bb0b17e"
},
"downloads": -1,
"filename": "prettree-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "57902f71f429babf4c6701b54c1a3e88",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 4773,
"upload_time": "2025-01-07T23:07:45",
"upload_time_iso_8601": "2025-01-07T23:07:45.162482Z",
"url": "https://files.pythonhosted.org/packages/8b/c3/2a09bcffd78dafd98582fb2a9e707842ea89f9de4f899f7e0c69e4755504/prettree-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-07 23:07:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mucahitkayadan",
"github_project": "prettree",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "prettree"
}