Created
July 11, 2024 03:08
-
-
Save jupiterbjy/9479cc8811680277e387ba8339cdf693 to your computer and use it in GitHub Desktop.
Some generic pseudo random tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Pseudo Random Picker from CSV input | |
:Author: jupiterbjy@gmail.com | |
""" | |
import random | |
YELLOW = "\033[93m" | |
GREEN = "\033[92m" | |
RED = "\033[91m" | |
while True: | |
raw_input = input(f"{YELLOW}Choices (CSV) >> \33[0m").strip() | |
# if empty don't bother | |
if not raw_input: | |
print(f"{GREEN}\33[3mSaint Pseudorandom once said... \"Mah boy! You musn't hesitate...\"\n") | |
continue | |
raw_split = [part.strip() for part in raw_input.split(",")] | |
choice = random.choice(raw_split) | |
# 0: reset / 3: italic / 4: underline / 5: slow blink | |
print(f"{GREEN}\33[3mSaint Pseudorandom once said... \"Tho shall be {RED}\33[4m{choice}\33[0;3m{GREEN}\"\n") |
Author
jupiterbjy
commented
Jul 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment