Metadata-Version: 2.4
Name: tree2dir
Version: 0.1.2
Summary: A CLI tool to convert ASCII tree diagrams into actual folder structures.
Author-email: Soham Alai <justop072005@gmail.com>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# 🌳 tree2dir

![PyPI - Version](https://img.shields.io/pypi/v/tree2dir)
![Python Support](https://img.shields.io/pypi/pyversions/tree2dir)
![License](https://img.shields.io/pypi/l/tree2dir)

**tree2dir** is a lightning-fast command-line tool that converts ASCII tree diagrams directly into actual file and folder structures. 

Stop manually creating nested directories and files when scaffolding new projects. Just sketch your architecture in a text file, and let `tree2dir` build the entire structure in seconds.

## ✨ Features

* **Zero Dependencies:** Built entirely with Python's standard library.
* **Smart Detection:** Automatically distinguishes between folders and files.
* **Deep Nesting:** Accurately calculates indentation to create deeply nested structures.
* **Idempotent:** Safe to run multiple times; it won't overwrite existing files with the same name.

## 📦 Installation

Install easily via pip:

```bash
pip install tree2dir
```

## 🚀 Usage

**1. Create a text file with your diagram (e.g., `structure.txt`):**

Here is an example structure:

```text
my_project/
├── data/
│   ├── raw/
│   └── processed/
├── notebooks/
│   ├── 01_EDA.ipynb
│   └── 02_model_training.ipynb
├── src/
│   ├── knn_classifier.py
│   └── svm_classifier.py
├── models/
├── README.md
└── requirements.txt
```

**2. Run the command:**

To generate the structure in your current directory, simply point the tool at your text file:

```bash
tree2dir structure.txt
```

To generate the structure in a specific destination folder, use the `-d` or `--dest` flag:

```bash
tree2dir structure.txt -d ./my_new_project
```

## 🛠️ Development & Contributing

If you want to contribute or modify the tool locally:

1. Clone the repository.
2. Install it in editable mode:
   ```bash
   pip install -e .
   ```
3. Test your changes using the CLI command `tree2dir`.

