-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiddydeleter.py
More file actions
62 lines (50 loc) · 1.67 KB
/
diddydeleter.py
File metadata and controls
62 lines (50 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import tkinter as tk
from PIL import Image, ImageTk
from itertools import count, cycle
import requests
class ImageLabel(tk.Label):
def load(self, im):
if isinstance(im, str):
im = Image.open(im)
frames = []
try:
for i in count(1):
frames.append(ImageTk.PhotoImage(im.copy()))
im.seek(i)
except EOFError:
pass
self.frames = cycle(frames)
try:
self.delay = im.info['duration']
except:
self.delay = 100
if len(frames) == 1:
self.config(image=next(self.frames))
else:
self.next_frame()
def unload(self):
self.config(image=None)
self.frames = None
def next_frame(self):
if self.frames:
self.config(image=next(self.frames))
self.after(self.delay, self.next_frame)
root = tk.Tk()
lbl = ImageLabel(root)
lbl.pack()
lbl.load('diddy-baby-oil.gif')
lbl.place(x=0)
Logo = tk.Label(root, width=12, height=1, text="Diddy Deleter", font=("Arial", 32), background='white')
Logo.place(x=70, y=50)
subText = tk.Label(root, width=15, height=1, text="Webhook URL: ", font=("Arial", 10), bg="white")
subText.place(x=200, y=200)
textBox = tk.Text(root, width=20, height=1, font=("Helvetica", 16))
textBox.place(x=150, y= 250)
def delete_webhook():
input_text = textBox.get("1.0", tk.END).strip()
requests.delete(input_text)
deleteButton = tk.Button(root, text="Delete", command=delete_webhook)
deleteButton.place(x=250, y=300)
root.configure(background="white")
root.geometry("400x500")
root.mainloop()