From b8f2a70379df5542350909c836b3022c604db9d6 Mon Sep 17 00:00:00 2001 From: jerick Date: Sat, 9 Aug 2025 16:03:12 -0400 Subject: [PATCH] fixed unicode characters --- random_timer.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/random_timer.py b/random_timer.py index 73c2243..f6812d1 100755 --- a/random_timer.py +++ b/random_timer.py @@ -16,7 +16,7 @@ TIMER_SECONDS = 30 # how long the timer runs # ---------- HELPERS ---------- def load_words(path=WORDS_FILE): - """Return a list of non‑empty stripped lines from the given file.""" + """Return a list of non-empty stripped lines from the given file.""" try: with open(path, "r", encoding="utf-8") as f: words = [line.strip() for line in f if line.strip()] @@ -70,22 +70,22 @@ def main(): words = load_words() timer_thread = None - print("=== Catchphrase ===") + print("=== Catchphrase, but Better ===") print("Commands:") - print(" start – begin the 30‑second timer and show a word immediately") - print(" next – show another random word while the timer is running") - print(" stop – cancel the timer early") - print(" exit / quit – leave the program") + print(" start - begin the 30-second timer and show a word immediately") + print(" next - show another random word while the timer is running") + print(" stop - cancel the timer early") + print(" exit / quit - leave the program") # Helper that prints when the timer ends def announce_finish(): - print("\n⏰ Time’s up! Returning to menu.") + print("\n⏰ Time is up! Returning to menu.") print("=== Catchphrase ===") print("Commands:") - print(" start – begin the 30‑second timer and show a word immediately") - print(" next – show another random word while the timer is running") - print(" stop – cancel the timer early") - print(" exit / quit – leave the program") + print(" start - begin the 30-second timer and show a word immediately") + print(" next - show another random word while the timer is running") + print(" stop - cancel the timer early") + print(" exit / quit - leave the program") while True: try: @@ -111,11 +111,11 @@ def main(): # Show the first word right away print(pick_random(words)) - print(f"[+] 30‑second timer started. ({TIMER_SECONDS}s)") + print(f"[+] 30-second timer started. ({TIMER_SECONDS}s)") elif cmd == "next": if not (timer_thread and timer_thread.is_running): - print("[!] No active timer – use 'start' first.") + print("[!] No active timer - use 'start' first.") else: print(pick_random(words))