# smart_text_randomizer
Smart Text Randomizer.
---
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/smart_text_randomizer)](https://github.com/smartlegionlab/smart_text_randomizer/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/smart_text_randomizer?label=pypi%20downloads)](https://pypi.org/project/smart_text_randomizer/)
![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/smart_text_randomizer)
[![PyPI](https://img.shields.io/pypi/v/smart_text_randomizer)](https://pypi.org/project/smart_text_randomizer)
[![GitHub](https://img.shields.io/github/license/smartlegionlab/smart_text_randomizer)](https://github.com/smartlegionlab/smart_text_randomizer/blob/master/LICENSE)
[![PyPI - Format](https://img.shields.io/pypi/format/smart_text_randomizer)](https://pypi.org/project/smart_text_randomizer)
***
Author and developer: ___A.A. Suvorov.___
***
## What is news:
smart_text_randomizer v0.0.2
- Fixed bugs.
- Added documentation.
- Improved security. random was replaced with secrets.
***
## Help:
`pip install smart_text_randomizer`
"Text randomization" or "variable text". It is used to create different variations of the same message.
You are using special syntax. Example: `'{Salute|Hello|Good morning} {comrade|buddy|dear friend}!'`
This syntax allows you to create variable messages by using curly braces and vertical bars to indicate alternatives.
Basic elements of syntax:
1. Curly braces {}: Used to group text options. Anything inside the curly braces will be randomly selected when generating the text.
2. Vertical bar |: Used to separate different text options within curly braces. Each option will be treated as a separate choice.
Example of use:
- Syntax: `'{Salute|Hello|Good morning} {comrade|buddy|dear friend}!'`
- Possible results:
- Salute comrade!
- Salute buddy!
- Salute dear friend!
- Hello comrade!
- Hello buddy!
- Hello dear friend!
- Good morning comrade!
- Good morning buddy!
- Good morning dear friend!
- How to use:
1. Create your text: Identify which parts of your message can vary and place them in curly braces.
2. Add options: Separate alternatives with a vertical bar.
3. Text Generation: Use RandomStringMaster() to generate a random message.
- Notes:
- Make sure all options inside the curly braces make sense and fit the context.
- You can use multiple randomization groups in a single message to create more complex variations.
Example of text randomization:
```python
from smart_text_randomizer import TextRandomizer
text_randomizer = TextRandomizer()
text = '{Salute|Hello|Good morning} {comrade|buddy|dear friend}!'
randomized_text = TextRandomizer.randomize(text)
print(randomized_text) # Good morning buddy!
```
***
## Disclaimer of liability:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
***
## Copyright:
--------------------------------------------------------
Licensed under the terms of the BSD 3-Clause License
(see LICENSE for details).
Copyright © 2018-2024, A.A. Suvorov
All rights reserved.
--------------------------------------------------------
Raw data
{
"_id": null,
"home_page": "https://github.com/smartlegionlab/smart_text_randomizer/",
"name": "smart-text-randomizer",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "text randomizer, smart_text_randomizer, smartlegionlab, A.A Suvorov",
"author": "A.A. Suvorov",
"author_email": "smartlegiondev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3b/5d/1d8c22d41f4e86abcb1303ccaffb4f02f393d3ac4e4e0623fabcd616f22c/smart_text_randomizer-0.0.2.tar.gz",
"platform": null,
"description": "# smart_text_randomizer\n\nSmart Text Randomizer.\n\n---\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/smartlegionlab/smart_text_randomizer)](https://github.com/smartlegionlab/smart_text_randomizer/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/smart_text_randomizer?label=pypi%20downloads)](https://pypi.org/project/smart_text_randomizer/)\n![GitHub top language](https://img.shields.io/github/languages/top/smartlegionlab/smart_text_randomizer)\n[![PyPI](https://img.shields.io/pypi/v/smart_text_randomizer)](https://pypi.org/project/smart_text_randomizer)\n[![GitHub](https://img.shields.io/github/license/smartlegionlab/smart_text_randomizer)](https://github.com/smartlegionlab/smart_text_randomizer/blob/master/LICENSE)\n[![PyPI - Format](https://img.shields.io/pypi/format/smart_text_randomizer)](https://pypi.org/project/smart_text_randomizer)\n\n***\n\nAuthor and developer: ___A.A. Suvorov.___\n\n***\n\n## What is news:\n\nsmart_text_randomizer v0.0.2\n\n- Fixed bugs.\n- Added documentation.\n- Improved security. random was replaced with secrets.\n\n***\n\n## Help:\n\n`pip install smart_text_randomizer`\n\n\"Text randomization\" or \"variable text\". It is used to create different variations of the same message.\n\nYou are using special syntax. Example: `'{Salute|Hello|Good morning} {comrade|buddy|dear friend}!'`\n\nThis syntax allows you to create variable messages by using curly braces and vertical bars to indicate alternatives.\n\nBasic elements of syntax:\n\n1. Curly braces {}: Used to group text options. Anything inside the curly braces will be randomly selected when generating the text.\n2. Vertical bar |: Used to separate different text options within curly braces. Each option will be treated as a separate choice.\n\nExample of use:\n\n- Syntax: `'{Salute|Hello|Good morning} {comrade|buddy|dear friend}!'`\n- Possible results:\n - Salute comrade!\n - Salute buddy!\n - Salute dear friend!\n - Hello comrade!\n - Hello buddy!\n - Hello dear friend!\n - Good morning comrade!\n - Good morning buddy!\n - Good morning dear friend!\n- How to use:\n 1. Create your text: Identify which parts of your message can vary and place them in curly braces.\n 2. Add options: Separate alternatives with a vertical bar.\n 3. Text Generation: Use RandomStringMaster() to generate a random message.\n\n- Notes:\n - Make sure all options inside the curly braces make sense and fit the context.\n - You can use multiple randomization groups in a single message to create more complex variations.\n\n\nExample of text randomization:\n\n```python\nfrom smart_text_randomizer import TextRandomizer\n\ntext_randomizer = TextRandomizer()\n\ntext = '{Salute|Hello|Good morning} {comrade|buddy|dear friend}!'\nrandomized_text = TextRandomizer.randomize(text)\nprint(randomized_text) # Good morning buddy!\n```\n\n***\n\n## Disclaimer of liability:\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n***\n\n## Copyright:\n --------------------------------------------------------\n Licensed under the terms of the BSD 3-Clause License\n (see LICENSE for details).\n Copyright \u00a9 2018-2024, A.A. Suvorov\n All rights reserved.\n --------------------------------------------------------\n\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "Smart Text Randomizer.",
"version": "0.0.2",
"project_urls": {
"Documentation": "https://github.com/smartlegionlab/smart_text_randomizer/blob/master/README.md",
"Homepage": "https://github.com/smartlegionlab/smart_text_randomizer/",
"Release notes": "https://github.com/smartlegionlab/smart_text_randomizer/releases"
},
"split_keywords": [
"text randomizer",
" smart_text_randomizer",
" smartlegionlab",
" a.a suvorov"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6a98f471810d058ea95892eeda903890527db4739428cab36388634023e4e34e",
"md5": "bfe974ed6663cab88aa76a2829e7f3ab",
"sha256": "47435dcb392772187643e327322f8717092f1afb97b2a783c9dc65f23e0ca678"
},
"downloads": -1,
"filename": "smart_text_randomizer-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bfe974ed6663cab88aa76a2829e7f3ab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 5234,
"upload_time": "2024-08-01T06:32:09",
"upload_time_iso_8601": "2024-08-01T06:32:09.665729Z",
"url": "https://files.pythonhosted.org/packages/6a/98/f471810d058ea95892eeda903890527db4739428cab36388634023e4e34e/smart_text_randomizer-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3b5d1d8c22d41f4e86abcb1303ccaffb4f02f393d3ac4e4e0623fabcd616f22c",
"md5": "127b08c1aa2fb6d7781ac1f35cc1d080",
"sha256": "c72c2328f595ab70d018c43afc89d5486362b99389892e971a9b012f10b8a759"
},
"downloads": -1,
"filename": "smart_text_randomizer-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "127b08c1aa2fb6d7781ac1f35cc1d080",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4284,
"upload_time": "2024-08-01T06:32:11",
"upload_time_iso_8601": "2024-08-01T06:32:11.124255Z",
"url": "https://files.pythonhosted.org/packages/3b/5d/1d8c22d41f4e86abcb1303ccaffb4f02f393d3ac4e4e0623fabcd616f22c/smart_text_randomizer-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-01 06:32:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "smartlegionlab",
"github_project": "smart_text_randomizer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "smart-text-randomizer"
}