1
Finished Programs / WorkLog.py - work logging
« on: April 26, 2016, 04:15 AM »
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.

Latest version: https://gist.github....2deaab6f3aea57ca9684
Requires Python 3.5. Then just run the file.
Latest version: https://gist.github....2deaab6f3aea57ca9684
Code: Python [Select]
- #v1.0.2
- from random import choice
- from 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.