ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

WorkLog.py - work logging

(1/1)

justice:
Wrote this little script and thought it might be useful here. It allows you to keep track of what you are working on by writing a timestamped message to a CSV file.

WorkLog.py - work logging

Latest version: https://gist.github.com/svandragt/080843c4ba632deaab6f3aea57ca9684

--- Code: Python ---#v1.0.2from random import choicefrom datetime import datetime phases = [    'Ok, noted.', 'Right, back to work then!', 'Looking good bud.', 'Cheers, mate.'] now = datetime.now()answer = ''with open("worklog.csv", "a") as f:    while answer.strip() != 'exit':        f.write('"{}","{}"\n'.format(now,answer.strip()))        answer = input("What're you working on? ")        now = datetime.now()        print("[{}]".format(now),choice(phases), "\n")
Requires Python 3.5. Then just run the file.

Navigation

[0] Message Index

Go to full version