Skip to content

Instantly share code, notes, and snippets.

@sleexyz
Created February 20, 2013 23:25
Show Gist options
  • Save sleexyz/5000673 to your computer and use it in GitHub Desktop.
Save sleexyz/5000673 to your computer and use it in GitHub Desktop.
Big Brother type task reminder for t
#!/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