使用git进行时间跟踪。
Hammertime的Python项目详细描述
基于git的时间跟踪。在你的存储库中使用它 在中执行工作,或创建新存储库以跟踪您的工作。
安装
使用pip或easy_install:
$ easy_install Hammertime $ pip install Hammertime
用法
$ cd /repository $ git time start -m "Doing some work" $ # do work, commits, etc $ git time stop -m "Not doing work anymore" $ git time show
如果你有一个 json command line utility 已安装,请尝试以下操作:
$ git time show | json -o times delta $ git time show | json -o times start.message end.message delta
帮助
$ git time -h
注
按顺序调用git time stop两次或两次以上将始终 重写最后一个git time stop项。调用 git time start将始终创建新条目。
示例会话
alen@mu:[hammertime ~master]$ git time start -m "Starting something to work on" alen@mu:[hammertime ~master]$ vim README.md alen@mu:[hammertime ~master]$ git commit -am "Saved the example session" [master 11a0c98] Saved the example session 1 files changed, 5 insertions(+), 0 deletions(-) alen@mu:[hammertime ~master]$ git time stop -m "Readme updates with example session" alen@mu:[hammertime ~master]$ git time show {"times": [{"start": {"message": "Starting something to work on", "time": "2011-02-02T13:37:44.761185"}, "stop": {"message": "Readme updates with example session", "time": "2011-02-02T13:39:21.330041"}, "delta": "0:01:36"}]} alen@mu:[hammertime ~master]$ git time show | json -o times delta { "delta": "0:01:36" } alen@mu:[hammertime ~master]$ git time show | json -o times delta start.message stop.message { "delta": "0:01:36", "start": { "message": "Starting something to work on" }, "stop": { "message": "Readme updates with example session" } }