aboutsummaryrefslogtreecommitdiffstats
path: root/DataBase/ExtraPro
diff options
context:
space:
mode:
Diffstat (limited to 'DataBase/ExtraPro')
-rw-r--r--DataBase/ExtraPro/Alarm.py37
-rw-r--r--DataBase/ExtraPro/Test.py8
-rw-r--r--DataBase/ExtraPro/start.py29
3 files changed, 74 insertions, 0 deletions
diff --git a/DataBase/ExtraPro/Alarm.py b/DataBase/ExtraPro/Alarm.py
new file mode 100644
index 0000000..d912df5
--- /dev/null
+++ b/DataBase/ExtraPro/Alarm.py
@@ -0,0 +1,37 @@
+import os
+from playsound import playsound
+import datetime
+
+extracted_time = open('E:\\Zara\\Data.txt','rt')
+time = extracted_time.read()
+Time = str(time)
+
+delete_time = open("E:\\Zara\\Data.txt",'r+')
+delete_time.truncate(0)
+delete_time.close()
+
+def RingerNow(time):
+
+ time_to_set = str(time)
+ time_now = time_to_set.replace("zara","")
+ time_now = time_now.replace("set alarm for ","")
+ time_now = time_now.replace("set ","")
+ time_now = time_now.replace("alarm ","")
+ time_now = time_now.replace("for ","")
+ time_now = time_now.replace(" and ",":")
+
+ Alarm_Time = str(time_now)
+
+ while True:
+
+ current_time = datetime.datetime.now().strftime("%H:%M")
+
+ if current_time == Alarm_Time:
+ print("Wake Up Sir , It's Time To Work .")
+ playsound("E:\\Zara\\DataBase\\Sounds\\1.mp3")
+
+ elif current_time>Alarm_Time:
+ break
+
+RingerNow(Time)
+
diff --git a/DataBase/ExtraPro/Test.py b/DataBase/ExtraPro/Test.py
new file mode 100644
index 0000000..d46858d
--- /dev/null
+++ b/DataBase/ExtraPro/Test.py
@@ -0,0 +1,8 @@
+from time import sleep
+import pyautogui
+
+sleep(4)
+
+kk = pyautogui.position()
+
+print(kk)
diff --git a/DataBase/ExtraPro/start.py b/DataBase/ExtraPro/start.py
new file mode 100644
index 0000000..a2dff90
--- /dev/null
+++ b/DataBase/ExtraPro/start.py
@@ -0,0 +1,29 @@
+import os
+from GoogleImageScrapper.GoogleImageScrapper import GoogleImageScraper
+import pyautogui
+
+def GoogleImage():
+ oo = open('E:\\Zara\\Data.txt','rt')
+ query = str(oo.read())
+ oo.close()
+ pppp = open('E:\\Zara\\Data.txt','r+')
+ pppp.truncate(0)
+ pppp.close()
+
+ webdriver = "E:\\Zara\\DataBase\\webdriver\\chromedriver.exe"
+ photos = "E:\\Zara\\DataBase\\GooglePhotos\\"
+
+ search_keys = [f"{query}"]
+ number = 10
+ head = False
+ max = (1000,1000)
+ min = (0,0)
+
+ for search_key in search_keys:
+ image_search = GoogleImageScraper(webdriver,photos,search_keys,number,head,min,max)
+ image_url = image_search.find_image_urls()
+ image_search.save_images(image_url)
+
+ os.startfile(photos)
+
+GoogleImage()