Last active
November 25, 2018 02:05
-
-
Save jbwhaley/839bfda7d86413225f9e to your computer and use it in GitHub Desktop.
Cancels all currently scheduled notifications in Pythonista.
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# CancelReminders Version 1.0 | |
## Cancels all currently scheduled notifications in Pythonista. | |
import notification | |
import console | |
import webbrowser | |
scheduled = notification.get_scheduled() | |
url = 'launch://' | |
if scheduled == []: | |
console.hud_alert('None.', 'error') | |
else: | |
console.alert('Cancel all reminders?', 'Are you sure?', 'Yes') | |
notification.cancel_all() | |
console.hud_alert('Canceled.', 'success') | |
webbrowser.open(url) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Will cancel all scheduled Pythonista notifications; designed as a useful supplement to my QuickRemind script. Use with Launch Center Pro as is, or remove the last line if you prefer to run it directly in Pythonista.