From 8b40159ab33c809f9fe2326f11f0eeacf1c1a73d Mon Sep 17 00:00:00 2001 From: The Duskfall Portal Crew <58930427+duskfallcrew@users.noreply.github.com> Date: Thu, 26 Dec 2024 23:25:35 +1300 Subject: [PATCH] Update summon_a_demon.py --- summon_a_demon.py | 102 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 100 insertions(+), 2 deletions(-) diff --git a/summon_a_demon.py b/summon_a_demon.py index 7ad245c..beb7fd5 100644 --- a/summon_a_demon.py +++ b/summon_a_demon.py @@ -3,6 +3,7 @@ from tkinter import messagebox from PIL import Image, ImageTk import webbrowser +import re # this is used in the validation. class BeetlejuiceApp: def __init__(self, root): @@ -49,12 +50,14 @@ def show_beetlejuice_face(self): img = img.resize((200, 200), Image.Resampling.LANCZOS) photo = ImageTk.PhotoImage(img) - # Update the image_label with the image + # Update the image_label with the image and text self.image_label.config(image=photo) self.image_label.image = photo # Keep reference to avoid garbage collection self.image_label.config(text="It's Showtime!!") - self.root.after(3000, self.launch_video) # Launch video after 3 seconds + # Launch video after 3 seconds + self.root.after(3000, self.launch_video) + except FileNotFoundError: messagebox.showerror("Error", "beetlejuice.jpg not found in the current directory.") self.image_label.config(text="Image file not found!") @@ -63,6 +66,101 @@ def launch_video(self): video_url = "https://www.youtube.com/watch?v=ErHL4qwwyxw" webbrowser.open(video_url) + # Validation code is commented out for future use. + # def validate_lyrics(self): + # lyrics = self.phrase_entry.get() + # print(f"User input for lyrics: '{lyrics}'") + # expected_phrases = [ + # "Hey, folks! Begging your pardon!", + # "Scuse me! Sorry to barge in!", + # "Now let's skip the tears and start on the whole", + # "Y'know, 'being dead' thing", + # "You're doomed! Enjoy the singing", + # "The sword of Damocles is swinging", + # "And if I hear your cell phone ringing", + # "I'll kill you myself", + # "The whole 'being dead' thing!", + # "Death can get a person stressed", + # "We should have carpe'd way more diems", + # "Now we're never gonna see 'em!", + # "I can show you what comes next", + # "So don't be freaked", + # "Stay in your seats", + # "I do this bullshit, like, eight times a week", + # "So just relax, you'll be fine", + # "Drink your fifty-dollar wine", + # "And take a breath!", + # "You're", + # "You're gonna be fine", + # "On the other side", + # "DIE! YOU'RE ALL GONNA DIE!", + # "YOU'RE ALL GONNA DIE!", + # "I'll", + # "I'll be your guide", + # "To the other side", + # "Well in full disclosure: it's a show about death!", + # "Everybody gets on fine here", + # "Like Rodgers, Hart, and Hammerstein here", + # "The women's bathroom has no line here", + # "Just pee where you want", + # "The whole 'being dead' thing!", + # "You're just gonna love the folks here", + # "Yeah, I know you're woke, but you can take a joke here", + # "And every show I do, like, a TON of coke here", + # "The whole—", + # "PAH-HAH! The whole 'being dead' thing!", + # "Nobody is bullet-proof", + # "I work out, I eat clean!", + # "Jesus, pass the Dramamine", + # "Time to face the brutal truth: (Dies Illa)", + # "Cause we're all on a hit list", + # "Might not live 'till Christmas", + # "Choke to death on Triscuits", + # "Hey, that's just statistics", + # "So take a little break here", + # "Kinda like a wake here", + # "The scenery is fake here", + # "But there's a giant snake here!", + # "Ha ha ha", + # "You're", + # "You're gonna be fine—thank you!", + # "On the other side—how you doin'?", + # "Oh, not good!", + # "Ba-be-ba-ba-be-bo-boo-bap-boop!", + # "Seriously, though, this is a show about—", + # "Death is taboo, but it's hardly something new", + # "There's nothing medical professionals could do", + # "cept maybe just bill you", + # "If you die while listening to this album, it's still gonna keep playing.", + # "There's no destiny or fate", + # "Just a terrifying wait", + # "Filled with people that you hate", + # "And on a certain date, the Universe kills you!", + # "That's the thing with life:", + # "No one makes it out alive", + # "Toss that body in the pit", + # "Gosh, it's awful, ain't it tragic?", + # "Blah-blah, Bible, Jesus magic", + # "When you're dead, who gives a shit?", + # "No pilates, no more yoga!", + # "Namaste, you freakin' posers", + # "From the cradle to cremation (Dies Irae)", + # "Death just needs a little conversation!", + # "I have mastered the art (Dies Irae)", + # "Of tearing convention apart (Dies Irae)", + # "So, how about we all make a start (Dies Irae)", + # "On the whole 'being dead' thing!", + # "God, I hope you're ready for a show about death!" + # ] + # # Regex to check if any of the expected phrases appears, allowing for case variations and partial matches: + # if any(re.search(r'\b' + re.escape(phrase) + r'\b', lyrics, re.IGNORECASE) for phrase in expected_phrases): + # messagebox.showinfo("Validation", "Congratulations! Your summoning is validated.") + # video_url = "https://www.youtube.com/watch?v=ErHL4qwwyxw" + # webbrowser.open(video_url) + # else: + # messagebox.showwarning("Validation", "Sorry, the summoning is not validated.") + # self.phrase_entry.delete(0, tk.END) + if __name__ == "__main__": root = tk.Tk() app = BeetlejuiceApp(root)