This repository has been archived by the owner on May 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
2,596 additions
and
38 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Import Required Library | ||
from tkinter import * | ||
import datetime | ||
import time | ||
import winsound | ||
from threading import * | ||
|
||
# Create Object | ||
root = Tk() | ||
|
||
# Set geometry | ||
root.geometry("400x200") | ||
|
||
# Use Threading | ||
def Threading(): | ||
t1=Thread(target=alarm) | ||
t1.start() | ||
|
||
def alarm(): | ||
# Infinite Loop | ||
while True: | ||
# Set Alarm | ||
set_alarm_time = f"{hour.get()}:{minute.get()}:{second.get()}" | ||
|
||
# Wait for one seconds | ||
time.sleep(1) | ||
|
||
# Get current time | ||
current_time = datetime.datetime.now().strftime("%H:%M:%S") | ||
print(current_time,set_alarm_time) | ||
|
||
# Check whether set alarm is equal to current time or not | ||
if current_time == set_alarm_time: | ||
print("Time to Wake up") | ||
# Playing sound | ||
winsound.PlaySound("sound.wav",winsound.SND_ASYNC) | ||
|
||
# Add Labels, Frame, Button, Optionmenus | ||
Label(root,text="Alarm Clock",font=("Helvetica 20 bold"),fg="red").pack(pady=10) | ||
Label(root,text="Set Time",font=("Helvetica 15 bold")).pack() | ||
|
||
frame = Frame(root) | ||
frame.pack() | ||
|
||
hour = StringVar(root) | ||
hours = ('00', '01', '02', '03', '04', '05', '06', '07', | ||
'08', '09', '10', '11', '12', '13', '14', '15', | ||
'16', '17', '18', '19', '20', '21', '22', '23', '24' | ||
) | ||
hour.set(hours[0]) | ||
|
||
hrs = OptionMenu(frame, hour, *hours) | ||
hrs.pack(side=LEFT) | ||
|
||
minute = StringVar(root) | ||
minutes = ('00', '01', '02', '03', '04', '05', '06', '07', | ||
'08', '09', '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') | ||
minute.set(minutes[0]) | ||
|
||
mins = OptionMenu(frame, minute, *minutes) | ||
mins.pack(side=LEFT) | ||
|
||
second = StringVar(root) | ||
seconds = ('00', '01', '02', '03', '04', '05', '06', '07', | ||
'08', '09', '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') | ||
second.set(seconds[0]) | ||
|
||
secs = OptionMenu(frame, second, *seconds) | ||
secs.pack(side=LEFT) | ||
|
||
Button(root,text="Set Alarm",font=("Helvetica 15"),command=Threading).pack(pady=20) | ||
|
||
# Execute Tkinter | ||
root.mainloop() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#Importing Libraries | ||
#Importing Google Text to Speech library | ||
from gtts import gTTS | ||
|
||
#Importing PDF reader PyPDF2 | ||
import PyPDF2 | ||
|
||
#Open file Path | ||
pdf_File = open('name.pdf', 'rb') | ||
|
||
#Create PDF Reader Object | ||
pdf_Reader = PyPDF2.PdfFileReader(pdf_File) | ||
count = pdf_Reader.numPages # counts number of pages in pdf | ||
textList = [] | ||
|
||
#Extracting text data from each page of the pdf file | ||
for i in range(count): | ||
try: | ||
page = pdf_Reader.getPage(i) | ||
textList.append(page.extractText()) | ||
except: | ||
pass | ||
|
||
#Converting multiline text to single line text | ||
textString = " ".join(textList) | ||
|
||
print(textString) | ||
|
||
#Set language to english (en) | ||
language = 'en' | ||
|
||
#Call GTTS | ||
myAudio = gTTS(text=textString, lang=language, slow=False) | ||
|
||
#Save as mp3 file | ||
myAudio.save("Audio.mp3") |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<h1>Billing system using Tkinter</h1> | ||
<p>This project can be used for any shops. User can store all the data and generate the bill.</p> | ||
|
||
<h2>Tech stack:</h2> | ||
<ul> | ||
<li>Python</li> | ||
</ul> | ||
|
||
<h2>Libraries used:</h2> | ||
<ul> | ||
<li>Tkinter</li> | ||
<li>Os</li> | ||
<li>Messagebox</li> | ||
</ul> | ||
|
||
<h3>To install external modules:</h3> | ||
<p><li>Run pip install tkinter</li></p> | ||
|
||
<h3>To execute the project:</h3> | ||
<p><li>Run billing system.py</li></p> | ||
|
||
<h3>Screenshot/GIF of this project.</h3> | ||
|
||
 |
Oops, something went wrong.