Skip to content

Instantly share code, notes, and snippets.

@roddds
Forked from natanielstrack/reminder.py
Last active July 19, 2016 01:22
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 roddds/52cc0857083490eb5050b96f09f61429 to your computer and use it in GitHub Desktop.
Save roddds/52cc0857083490eb5050b96f09f61429 to your computer and use it in GitHub Desktop.
import time
import sys
import sched
from pync import Notifier
def main():
seconds = int(sys.argv[1]) * 60
text = sys.argv[2]
Notifier.notify(text, title="Reminder", sound="default")
s = sched.scheduler(time.time, time.sleep)
s.enter(seconds, 1, showNotifier, ())
s.run()
if __name__ == '__main__':
if len(sys.argv) < 3:
raise ValueError("Two positional arguments required")
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment