Skip to content

Commit 858d92a

Browse files
committed
created Tkinter alarm clock and documentation for the same
1 parent b82480e commit 858d92a

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

Tkinter Clock/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<h1> Tkinter Alarm Clock </h1>
2+
<h3>Introduction</h3>
3+
<p>Tkinter Alarm Clock is a simple desktop application built using the Tkinter library in Python. It allows users to set alarms and receive notifications when the alarm time is reached.</p>
4+
5+
<h3>Requirements</h3>
6+
7+
<p>To run the Tkinter Alarm Clock application, ensure that you have the following installed:</p>
8+
9+
<ul style="list-style-type:circle">
10+
<li>Python (version 3.x)</li>
11+
<li>Tkinter library</li>
12+
<li>winsound library (for sound playback on Windows)</li>
13+
</ul>
14+
15+
<h3>Usage</h3>
16+
17+
<p>Once the Tkinter Alarm Clock application is running, follow these steps to set an alarm:</p>
18+
<ul style= "list-style-type:circle">
19+
20+
<li>Enter the desired alarm time in the format HH:MM:SS (24-hour format) in the corresponding text fields for hours, minutes, and seconds.</li><
21+
22+
<li>Click the "Set Your Alarm" button to set the alarm.</li>
23+
24+
<li>The application will continuously check the current time against the set alarm time. When the alarm time is reached, it will play a sound (if available) and display the current time in the terminal.</li>
25+
26+
<li>To stop the alarm, close the application window.</li>
27+
28+
</ul>
29+
30+
<h3>Conclusion</h3>
31+
32+
<p>The Tkinter Alarm Clock application provides a simple and convenient way to set alarms and receive notifications. You can use it as is or customize it to suit your specific requirements. Enjoy using the Tkinter Alarm Clock!</p>
33+
34+
35+

Tkinter Clock/main.py.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def Alarm(set_alarm_timer):
1010
cur_time = actual_time.strftime("%H:%M:%S")
1111
cur_date = actual_time.strftime("%d/%m/%Y")
1212
msg="Current Time: "+str(cur_time)
13-
print(msg)
1413
if cur_time == set_alarm_timer:
1514
winsound.PlaySound("Music.wav",winsound.SND_ASYNC)
1615
break
@@ -32,5 +31,4 @@ def get_alarm_time():
3231
minTime= Entry(window,textvariable = min,bg = "#48C9B0",width = 4,font=(20)).place(x=270,y=40)
3332
secTime = Entry(window,textvariable = sec,bg = "#48C9B0",width = 4,font=(20)).place(x=330,y=40)
3433
submit = Button(window,text = "Set Your Alarm",fg="Black",bg="#D4AC0D",width = 15,command = get_alarm_time,font=(20)).place(x =100,y=80)
35-
window.mainloop()
36-
34+
window.mainloop()

0 commit comments

Comments
 (0)