| name | to-chaos-case |
| description | rEwRiTe TeXt In ChAoS CaSe — alternating or randomised capitalisation. Pure mechanical transform, no LLM call needed. Use when the user wants the SpongeBob / mocking-text effect on a string, paragraph, or file. |
To-Chaos-Case
Apply chaotic capitalisation to text. Two modes:
alternating (default) — flip case on every alphabetic character: hello world → hElLo WoRlD.
random — each letter independently 50/50 upper or lower.
Non-alphabetic characters pass through unchanged.
Inputs
- Source text — inline string, clipboard, or file path.
- Mode —
alternating (default) or random.
- Seed (optional,
random mode only) — integer for reproducible output.
Implementation
Do this in code, not via the model — it's a deterministic string operation.
import sys, random
def alternating(s):
out, flip = [], False
for c in s:
if c.isalpha():
out.append(c.upper() if flip else c.lower())
flip = not flip
else:
out.append(c)
return "".join(out)
def randomised(s, seed=None):
rng = random.Random(seed)
return "".join(c.upper() if c.isalpha() and rng.random() < 0.5 else c.lower() if c.isalpha() else c for c in s)
Output
Print the transformed text to stdout. With --in-place, overwrite the source file.