in Life, productivity, Uncategorized

log activity with launchy

1. make a directory named c:scratch

2. create a python script log.py and save the same directory
import time
import sys

now = time.localtime(time.time())
tim=time.strftime(“%Y/%m/%d %H:%M:%S”, now)

fp = open(“c:scratchmyLog.txt”, “a”)
message = ” “.join(sys.argv[1:])
print >>fp, tim+” “+message

fp.close()

3. register that directory and *.py in launchy category and rescan

4. Restart launchy

5. invoke launchy and type “log” and type tab

6. jot down log message and enter

Reference
http://benkraal.wordpress.com/2007/05/16/launchy-append-text-to-a-file-from-anywhere/

Write a Comment

Comment