Metadata-Version: 2.4
Name: prettree
Version: 0.1.1
Summary: A cross-platform directory tree visualization tool
Project-URL: Homepage, https://github.com/mucahitkayadan/prettree
Project-URL: Repository, https://github.com/mucahitkayadan/prettree.git
Author-email: Muja Kayadan <mujakayadan@outlook.com>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,directory,filesystem,tree
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# PreTree 🌳

[![PyPI version](https://badge.fury.io/py/prettree.svg)](https://badge.fury.io/py/prettree)
[![PyPI Downloads](https://img.shields.io/pypi/dm/prettree.svg)](https://pypi.org/project/prettree/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.6+](https://img.shields.io/badge/python-3.6+-blue.svg)](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

## Demo

```
$ prettree
D:/Codes/FileTree
├── dist
│   ├── prettree-0.1.0-py3-none-any.whl (5,368 bytes)
│   └── prettree-0.1.0.tar.gz (4,773 bytes)
├── src
│   ├── prettree
│   │   ├── __pycache__
│   │   │   ├── __init__.cpython-313.pyc (244 bytes)
│   │   │   ├── cli.cpython-313.pyc (2,792 bytes)
│   │   │   └── core.cpython-313.pyc (6,148 bytes)
│   │   ├── __init__.py (88 bytes)
│   │   ├── cli.py (2,267 bytes)
│   │   └── core.py (4,103 bytes)
│   └── prettytree
│       └── __init__.py (1 bytes)
├── tests
│   └── test_prettree.py (1,384 bytes)
├── ~
├── LICENSE.md (1,096 bytes)
├── pyproject.toml (1,170 bytes)
└── README.md (1,966 bytes)
```

## 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 prettree 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.   
