Smart-text-randomizer

Latest version: v0.0.2

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.0.2

- Fixed bugs.
- Added documentation.
- Improved security. random was replaced with secrets.

0.0.1

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!

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.