Skip to content

Instantly share code, notes, and snippets.

@KaushikShresth07
Created June 12, 2021 13:31
Show Gist options
  • Select an option

  • Save KaushikShresth07/e5807cba2f8d9f7a39c5bf2924651e9d to your computer and use it in GitHub Desktop.

Select an option

Save KaushikShresth07/e5807cba2f8d9f7a39c5bf2924651e9d to your computer and use it in GitHub Desktop.
from os import TMP_MAX
from time import sleep
from notifypy import Notify
import datetime
import os
def RemindMe(Title,Message,time,PathNow,PathToSave):
time = str(time).replace(":","")
timekikli = str(time)
filename = str(time) + "-note.txt"
with open(filename,"w") as file:
file.write(Message)
path_21 = str(PathNow) + str(filename)
path33 = str(PathToSave) + str(filename)
os.rename(path_21,path33)
os.startfile(path33)
noti = Notify()
noti.title = str(Title)
noti.message = str(Message)
while True:
time_now = datetime.datetime.now().strftime("%H:%M").replace(":","")
time_n = datetime.datetime.now().strftime("%H:%M")
if str(time)==str(time_now):
noti.send()
break
else:
print(f"Time Is Now : {time_n} ")
print(f"Time To Remind You : {timekikli}")
sleep(5)
print("Waiting To Remind You .")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment