Metadata-Version: 2.4
Name: text-chaos
Version: 1.0.2
Summary: A fun library for playful string manipulations like leetify, uwuify, zalgo, and more!
Project-URL: Homepage, https://github.com/guroosh/text-chaos
Project-URL: Documentation, https://github.com/guroosh/text-chaos#readme
Project-URL: Repository, https://github.com/guroosh/text-chaos.git
Project-URL: Issues, https://github.com/guroosh/text-chaos/issues
Author-email: Guroosh <guroosh.07@gmail.com>
Maintainer-email: Guroosh <guroosh.07@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Guroosh Singh
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: fun,leet,manipulation,string,text,transformation,uwu
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing
Requires-Python: >=3.8
Provides-Extra: dev
Requires-Dist: black>=22.0.0; extra == 'dev'
Requires-Dist: isort>=5.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# text-chaos 🎭

[![PyPI version](https://badge.fury.io/py/text-chaos.svg)](https://badge.fury.io/py/text-chaos)
[![Python](https://img.shields.io/pypi/pyversions/text-chaos.svg)](https://pypi.python.org/pypi/text-chaos)
[![Tests](https://github.com/guroosh/text-chaos/workflows/Tests/badge.svg)](https://github.com/guroosh/text-chaos/actions)

A fun Python library for playful string manipulations! Transform your text with various chaotic and amusing effects like leet speak, uwu-ification, zalgo corruption, and more.

## ✨ Features

- 🔥 **Simple API**: One function call to rule them all
- 🎯 **Multiple transformations**: leet, uwu, drunk, mock, pirate, and more
- 📦 **Extensible**: Easy to add custom transformations
- 🔍 **Type hints**: Full typing support for better IDE experience  
- 🧪 **Well tested**: Comprehensive test suite with pytest
- 🚀 **Fast**: Lightweight with no external dependencies

## 🚀 Installation

```bash
pip install text-chaos
```

## 📖 Quick Start

```python
import text_chaos

# Basic usage - defaults to leet speak
text_chaos.transform("Hello World!")
# Output: "H3110 W0r1d!"

# Try different transformation modes
text_chaos.transform("Hello World!", mode="uwu")
# Output: "Hewwo Wowwd! uwu"

text_chaos.transform("Hello World!", mode="drunk") 
# Output: "Helo Worrd!"

text_chaos.transform("Hello World!", mode="pirate")
# Output: "ahoy World! Arr!"

# Transform multiple strings at once
text_chaos.batch_transform(["Hello", "World"], mode="leet")
# Output: ["H3110", "W0r1d"]

# See all available transformation modes
text_chaos.get_modes()
# Output: ['leet', 'uwu', 'drunk', 'mock', 'pirate']
```

## 🎨 Available Transformations

| Mode | Description | Example |
|------|-------------|---------|
| `leet` | Convert to leet speak (1337) | `Hello` → `H3110` |
| `uwu` | UwU-ify text with cute speak | `Hello World` → `Hewwo Wowwd uwu` |
| `drunk` | Add typos and drunk typing errors | `Hello World` → `Helo Worrld` |
| `mock` | Add conversational fillers and pauses | `This is fine` → `This... uhh is, like, fine` |
| `pirate` | Transform to pirate speak | `Hello friend` → `Ahoy matey! Arr!` |

## 🔧 API Reference

### `transform(text: str, mode: str = "leet") -> str`

Transform a single string using the specified mode.

**Parameters:**
- `text` (str): The input text to transform
- `mode` (str, optional): The transformation mode. Defaults to "leet"

**Returns:**
- str: The transformed text

**Raises:**
- `ValueError`: If the specified mode is not available
- `TypeError`: If text is not a string

### `batch_transform(texts: List[str], mode: str = "leet") -> List[str]`

Transform multiple strings using the specified mode.

**Parameters:**
- `texts` (List[str]): List of input texts to transform
- `mode` (str, optional): The transformation mode. Defaults to "leet"

**Returns:**
- List[str]: List of transformed texts

### `get_modes() -> List[str]`

Get a list of all available transformation modes.

**Returns:**
- List[str]: Available transformation mode names

## 🛠️ Development

### Setup

```bash
# Clone the repository
git clone https://github.com/guroosh/text-chaos.git
cd text-chaos

# Install in development mode with dev dependencies
pip install -e ".[dev]"
```

### Running Tests

```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=text_chaos --cov-report=html

# Run specific test file
pytest tests/test_text_chaos.py -v
```

### Code Quality

```bash
# Format code
black src/ tests/

# Sort imports  
isort src/ tests/

# Type checking
mypy src/

# Run all quality checks
black src/ tests/ && isort src/ tests/ && mypy src/ && pytest
```

## 🤝 Contributing

Contributions are welcome! Here's how you can help:

1. **Add new transformations**: Create new functions in `src/text_chaos/transformers.py`
2. **Improve existing transformations**: Make them funnier, more accurate, or more efficient
3. **Fix bugs**: Check the issues tab for known problems
4. **Add tests**: Help us maintain high code coverage
5. **Improve documentation**: Better examples, clearer explanations

### Adding a New Transformation

1. Add your transformation function to `src/text_chaos/transformers.py`:

```python
def my_transform(text: str) -> str:
    \"\"\"
    Description of your transformation.
    
    Args:
        text: The input text to transform
        
    Returns:
        The transformed text
    \"\"\"
    # Your transformation logic here
    return transformed_text
```

2. Register it in the `TRANSFORMERS` dictionary:

```python
TRANSFORMERS = {
    # ... existing transformers
    "my_mode": my_transform,
}
```

3. Add tests in `tests/test_text_chaos.py`

4. Update this README with the new transformation

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🎉 Fun Examples

```python
import text_chaos

# Create some chaos!
text = "Python is awesome"

print("Original:", text)
print("Leet:", text_chaos.transform(text, "leet"))
print("UwU:", text_chaos.transform(text, "uwu"))  
print("Drunk:", text_chaos.transform(text, "drunk"))
print("Mock:", text_chaos.transform(text, "mock"))
print("Pirate:", text_chaos.transform(text, "pirate"))

# Chain transformations manually
chaotic_text = text_chaos.transform(text, "leet")
chaotic_text = text_chaos.transform(chaotic_text, "uwu")
print("Leet + UwU:", chaotic_text)
```

## 🌟 Star History

If you found this library useful, please consider giving it a star on GitHub! ⭐

---

Made with ❤️ and a bit of chaos 🎭
