Created
February 20, 2013 23:25
-
-
Save sleexyz/5000673 to your computer and use it in GitHub Desktop.
Big Brother type task reminder for t
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/env python | |
from time import sleep | |
from sh import t, broadcast | |
from random import choice | |
name = "Sean" | |
phrases = [ | |
name + ", you better ", | |
] | |
def expand(todo): | |
str = todo | |
mydict = { | |
"hw":"homework", | |
} | |
for k in mydict.keys(): | |
str = str.replace(k,mydict[k]) | |
return str | |
while(True): | |
task = t("--now").strip() | |
str = choice(phrases) + expand(task) + "." | |
broadcast(str) | |
sleep(1200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment