Smart Text Randomizer
Create different variations of the same message using special syntax with curly braces and vertical bars.
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:
| Syntax Element | Description |
|---|---|
{...} | Group text options for random selection |
| | Separate different options within braces |
Syntax:
'{Salute|Hello|Good morning} {comrade|buddy|dear friend}!'
Possible results:
TextRandomizer.randomize() to generate a random message.Notes:
pip install smart-text-randomizer
Example of text randomization:
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!
By using this software, you agree to the full disclaimer terms.
Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md
License: BSD 3-Clause License