Metadata-Version: 2.3
Name: wintree
Version: 0.1.5
Summary: A lightweight Python library and CLI tool for displaying visually structured directory trees with optional emoji and exclusion filters.
License: MIT
Author: harumiWeb
Author-email: ganaharumi@outlook.jp
Requires-Python: >=3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Description-Content-Type: text/markdown

# 📁🌳 wintree

`wintree` is a Python library that displays the hierarchical structure of a specified directory in a tree format. It can be easily used from the command line, supports visually appealing tree views with emojis, and allows you to specify directories to exclude.

## 🚀 Usage

### 📚️ As a Library

```py
import wintree

print(wintree.tree())
```

```bash
# sample output
📂 root: .
├── 📄 .gitignore
├── 📄 README.md
├── 📄 pyproject.toml
├── 📁 src/
│   ├── 📁 assets/
│   │   ├── 📄 icon.png
│   │   └── 📄 splash_android.png
│   └── 📄 main.py
└── 📁 storage/
    ├── 📁 data/
    └── 📁 temp/
```

With arguments:

```py
from wintree import tree

print(tree(root_dir="/path/to/project", use_emoji=True, ignore_dirs=[".git", "__pycache__"], filter_exts=[".py",".txt"]))
```

| Argument    | Type      | Description                                                                                         |
| ----------- | --------- | --------------------------------------------------------------------------------------------------- |
| root_dir    | str       | Path to the root directory to start displaying the tree. Default is the current directory "."       |
| use_emoji   | bool      | Whether to use emojis in the tree view. If True, adds icons to folders and files.                   |
| ignore_dirs | List[str] | List of directory names to exclude from the tree (partial match). Example: [".git", "node_modules"] |
| filter_ext  | List[str] | File extensions to include. Example: [".py", "txt"]                                                 |

You can also list absolute paths instead of

```py
import wintree

print(wintree.list_files())
```

### ⚙️ Usage from CLI

```bash
wintree /path/to/project --exclude .git __pycache__
```

#### Options

| Option     | Description                                                         |
| ---------- | ------------------------------------------------------------------- |
| path       | Path to the root directory                                          |
| --no-emoji | Disable emoji display                                               |
| --exclude  | Specify directory names to exclude (partial match, space-separated) |
| --ext      | File extensions to include                                          |

## 📌 Features

- Emoji-based tree view for better visibility
- Flexible exclusion of target directories
- Supports Windows/macOS/Linux
- Pure Python, no external dependencies

## 🧪 For Developers

This library can also be used as a base for directory visualization tools. Integration with GUI tools or IDE plugins is also possible.

## 📄 License

MIT License

# 🌐 Language

- [English](./README.en.md)
- [日本語](./README.ja.md)

