Name | text-chaos JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | A fun library for playful string manipulations like leetify, uwuify, zalgo, and more! |
upload_time | 2025-09-05 10:37:04 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
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. |
keywords |
fun
leet
manipulation
string
text
transformation
uwu
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# text-chaos π
[](https://badge.fury.io/py/text-chaos)
[](https://pypi.python.org/pypi/text-chaos)
[](https://github.com/yourusername/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, reverse, zalgo, mock, 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="reverse")
# Output: "!dlroW olleH"
text_chaos.transform("Hello World!", mode="mock")
# Output: "hElLo WoRlD!"
# 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', 'reverse', 'zalgo', 'mock']
```
## π¨ 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` |
| `reverse` | Reverse the text | `Hello` β `olleH` |
| `zalgo` | Add zalgo/corruption effects | `Hello` β `HΜ΄Μ°Γ«ΜlΜΆlΜ΄Μ°ΓΆΜ΅` |
| `mock` | aLtErNaTiNg CaPs (mocking SpongeBob) | `Hello World` β `hElLo WoRlD` |
## π§ 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/yourusername/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("Reverse:", text_chaos.transform(text, "reverse"))
print("Mock:", text_chaos.transform(text, "mock"))
print("Zalgo:", text_chaos.transform(text, "zalgo"))
# Chain transformations manually
chaotic_text = text_chaos.transform(text, "leet")
chaotic_text = text_chaos.transform(chaotic_text, "reverse")
print("Leet + Reverse:", 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 π
Raw data
{
"_id": null,
"home_page": null,
"name": "text-chaos",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "Guroosh <guroosh.07@gmail.com>",
"keywords": "fun, leet, manipulation, string, text, transformation, uwu",
"author": null,
"author_email": "Guroosh <guroosh.07@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/89/d8/99dd65622c785355a5ec4fb6d12ea75eaa551bb40ebeb7f0f62e097f3551/text_chaos-0.2.0.tar.gz",
"platform": null,
"description": "# text-chaos \ud83c\udfad\n\n[](https://badge.fury.io/py/text-chaos)\n[](https://pypi.python.org/pypi/text-chaos)\n[](https://github.com/yourusername/text-chaos/actions)\n\nA 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.\n\n## \u2728 Features\n\n- \ud83d\udd25 **Simple API**: One function call to rule them all\n- \ud83c\udfaf **Multiple transformations**: leet, uwu, reverse, zalgo, mock, and more\n- \ud83d\udce6 **Extensible**: Easy to add custom transformations\n- \ud83d\udd0d **Type hints**: Full typing support for better IDE experience \n- \ud83e\uddea **Well tested**: Comprehensive test suite with pytest\n- \ud83d\ude80 **Fast**: Lightweight with no external dependencies\n\n## \ud83d\ude80 Installation\n\n```bash\npip install text-chaos\n```\n\n## \ud83d\udcd6 Quick Start\n\n```python\nimport text_chaos\n\n# Basic usage - defaults to leet speak\ntext_chaos.transform(\"Hello World!\")\n# Output: \"H3110 W0r1d!\"\n\n# Try different transformation modes\ntext_chaos.transform(\"Hello World!\", mode=\"uwu\")\n# Output: \"Hewwo Wowwd! uwu\"\n\ntext_chaos.transform(\"Hello World!\", mode=\"reverse\") \n# Output: \"!dlroW olleH\"\n\ntext_chaos.transform(\"Hello World!\", mode=\"mock\")\n# Output: \"hElLo WoRlD!\"\n\n# Transform multiple strings at once\ntext_chaos.batch_transform([\"Hello\", \"World\"], mode=\"leet\")\n# Output: [\"H3110\", \"W0r1d\"]\n\n# See all available transformation modes\ntext_chaos.get_modes()\n# Output: ['leet', 'uwu', 'reverse', 'zalgo', 'mock']\n```\n\n## \ud83c\udfa8 Available Transformations\n\n| Mode | Description | Example |\n|------|-------------|---------|\n| `leet` | Convert to leet speak (1337) | `Hello` \u2192 `H3110` |\n| `uwu` | UwU-ify text with cute speak | `Hello World` \u2192 `Hewwo Wowwd uwu` |\n| `reverse` | Reverse the text | `Hello` \u2192 `olleH` |\n| `zalgo` | Add zalgo/corruption effects | `Hello` \u2192 `H\u0334\u0330\u00eb\u0301l\u0336l\u0334\u0330\u00f6\u0335` |\n| `mock` | aLtErNaTiNg CaPs (mocking SpongeBob) | `Hello World` \u2192 `hElLo WoRlD` |\n\n## \ud83d\udd27 API Reference\n\n### `transform(text: str, mode: str = \"leet\") -> str`\n\nTransform a single string using the specified mode.\n\n**Parameters:**\n- `text` (str): The input text to transform\n- `mode` (str, optional): The transformation mode. Defaults to \"leet\"\n\n**Returns:**\n- str: The transformed text\n\n**Raises:**\n- `ValueError`: If the specified mode is not available\n- `TypeError`: If text is not a string\n\n### `batch_transform(texts: List[str], mode: str = \"leet\") -> List[str]`\n\nTransform multiple strings using the specified mode.\n\n**Parameters:**\n- `texts` (List[str]): List of input texts to transform\n- `mode` (str, optional): The transformation mode. Defaults to \"leet\"\n\n**Returns:**\n- List[str]: List of transformed texts\n\n### `get_modes() -> List[str]`\n\nGet a list of all available transformation modes.\n\n**Returns:**\n- List[str]: Available transformation mode names\n\n## \ud83d\udee0\ufe0f Development\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/yourusername/text-chaos.git\ncd text-chaos\n\n# Install in development mode with dev dependencies\npip install -e \".[dev]\"\n```\n\n### Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=text_chaos --cov-report=html\n\n# Run specific test file\npytest tests/test_text_chaos.py -v\n```\n\n### Code Quality\n\n```bash\n# Format code\nblack src/ tests/\n\n# Sort imports \nisort src/ tests/\n\n# Type checking\nmypy src/\n\n# Run all quality checks\nblack src/ tests/ && isort src/ tests/ && mypy src/ && pytest\n```\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Here's how you can help:\n\n1. **Add new transformations**: Create new functions in `src/text_chaos/transformers.py`\n2. **Improve existing transformations**: Make them funnier, more accurate, or more efficient\n3. **Fix bugs**: Check the issues tab for known problems\n4. **Add tests**: Help us maintain high code coverage\n5. **Improve documentation**: Better examples, clearer explanations\n\n### Adding a New Transformation\n\n1. Add your transformation function to `src/text_chaos/transformers.py`:\n\n```python\ndef my_transform(text: str) -> str:\n \\\"\\\"\\\"\n Description of your transformation.\n \n Args:\n text: The input text to transform\n \n Returns:\n The transformed text\n \\\"\\\"\\\"\n # Your transformation logic here\n return transformed_text\n```\n\n2. Register it in the `TRANSFORMERS` dictionary:\n\n```python\nTRANSFORMERS = {\n # ... existing transformers\n \"my_mode\": my_transform,\n}\n```\n\n3. Add tests in `tests/test_text_chaos.py`\n\n4. Update this README with the new transformation\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83c\udf89 Fun Examples\n\n```python\nimport text_chaos\n\n# Create some chaos!\ntext = \"Python is awesome\"\n\nprint(\"Original:\", text)\nprint(\"Leet:\", text_chaos.transform(text, \"leet\"))\nprint(\"UwU:\", text_chaos.transform(text, \"uwu\")) \nprint(\"Reverse:\", text_chaos.transform(text, \"reverse\"))\nprint(\"Mock:\", text_chaos.transform(text, \"mock\"))\nprint(\"Zalgo:\", text_chaos.transform(text, \"zalgo\"))\n\n# Chain transformations manually\nchaotic_text = text_chaos.transform(text, \"leet\")\nchaotic_text = text_chaos.transform(chaotic_text, \"reverse\")\nprint(\"Leet + Reverse:\", chaotic_text)\n```\n\n## \ud83c\udf1f Star History\n\nIf you found this library useful, please consider giving it a star on GitHub! \u2b50\n\n---\n\nMade with \u2764\ufe0f and a bit of chaos \ud83c\udfad\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Guroosh Singh\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "A fun library for playful string manipulations like leetify, uwuify, zalgo, and more!",
"version": "0.2.0",
"project_urls": {
"Documentation": "https://github.com/guroosh/text-chaos#readme",
"Homepage": "https://github.com/guroosh/text-chaos",
"Issues": "https://github.com/guroosh/text-chaos/issues",
"Repository": "https://github.com/guroosh/text-chaos.git"
},
"split_keywords": [
"fun",
" leet",
" manipulation",
" string",
" text",
" transformation",
" uwu"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9524e899bff71011b287b0dabbfa0a06cb1748a4b4ae0d801bd2dda395680229",
"md5": "27d43d5b25a21bd72424b38f20bf8488",
"sha256": "58ea7542941b35bf95dc9a8b9a308041ca1f7b23ab67f5f6dab4955ebc32021e"
},
"downloads": -1,
"filename": "text_chaos-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "27d43d5b25a21bd72424b38f20bf8488",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11128,
"upload_time": "2025-09-05T10:37:02",
"upload_time_iso_8601": "2025-09-05T10:37:02.626131Z",
"url": "https://files.pythonhosted.org/packages/95/24/e899bff71011b287b0dabbfa0a06cb1748a4b4ae0d801bd2dda395680229/text_chaos-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "89d899dd65622c785355a5ec4fb6d12ea75eaa551bb40ebeb7f0f62e097f3551",
"md5": "4dc790fdc104c236fff9731034b80f40",
"sha256": "b05ab0d72b42a4f8d105eaad6f7fd329eafdb0ea0b8d4ce30de27a8cb043359c"
},
"downloads": -1,
"filename": "text_chaos-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "4dc790fdc104c236fff9731034b80f40",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 13071,
"upload_time": "2025-09-05T10:37:04",
"upload_time_iso_8601": "2025-09-05T10:37:04.021001Z",
"url": "https://files.pythonhosted.org/packages/89/d8/99dd65622c785355a5ec4fb6d12ea75eaa551bb40ebeb7f0f62e097f3551/text_chaos-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-05 10:37:04",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "guroosh",
"github_project": "text-chaos#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "text-chaos"
}