Skip to content

Instantly share code, notes, and snippets.

@cormacrelf
Created March 10, 2013 23:04
Show Gist options
  • Save cormacrelf/5130906 to your computer and use it in GitHub Desktop.
Save cormacrelf/5130906 to your computer and use it in GitHub Desktop.
seqtasks
import webbrowser
import urllib
import clipboard
import notification
import time
# get a newline-separated list of tasks from the clipboard
tasks = clipboard.get().split("\n")
# url quote the strings
url_tasks = map(urllib.quote, tasks)
url = "things:add?title="
# create the first task - dont need a notification for it
webbrowser.open(url + url_tasks[0])
# schedule a notification for each other task, 3s after the previous
for i in xrange(len(tasks) - 1):
notification.schedule(tasks[i+1], 3 + i*3, 'ding', url + url_tasks[i+1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment