Toast notifications
The previous project required windows notifications, so that it can ping me with new manga releases. I couldn't get the log in thing from the previous project working, but I'll at least get this running for now. The title and description part was simple enough, as it's just strings that I can change into whatever I want. The icon was a little more difficult as I have to enter the path of the image, and the image specifically has to be in ico file format. The next thing to worry about is having the program run in the background, without an active window. Looked it up, and apparently I have to place the shebang in the front so python knows which version and virtual environment it should use, and some other thing I'll do tomorrow.
#!/usr/bin/env python3
import time
from win10toast import ToastNotifier
toast = ToastNotifier()
while True:
toast.show_toast("Sample notificaiton", "sample description", icon_path=r"C:\Users\Conan\Desktop\rand\shrewd_pp.ico")
time.sleep(5)
Comments
Post a Comment