Created
March 10, 2013 23:04
-
-
Save cormacrelf/5130906 to your computer and use it in GitHub Desktop.
seqtasks
This file contains hidden or 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
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