Skip to content

Instantly share code, notes, and snippets.

@jbwhaley
Last active November 25, 2018 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbwhaley/839bfda7d86413225f9e to your computer and use it in GitHub Desktop.
Save jbwhaley/839bfda7d86413225f9e to your computer and use it in GitHub Desktop.
Cancels all currently scheduled notifications in Pythonista.
#!/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)
@jbwhaley
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment