通过命令行跟踪FreshBooks中的时间
fbtimer的Python项目详细描述
通过命令行跟踪FreshBooks中的时间。
安装和要求
Freshbooks计时器是为Python2.7和3.3+编写的。
安装(从pypi或源代码):
$ pip install fbtimer
或来源:
$ python setup.py install
用法
开始
要开始,请运行fbtimer,并按照以下步骤进行授权 以你的新生帐户为准。
$ fbtimer First we need access to your FreshBooks account. Press a key to open your browser and obtain an authorization code Press any key to continue ...
这将打开您的浏览器并将您发送到FreshBooks进行授权。 如果没有,我们会为你找到网址。授权后,您将 指向一个页面,显示 下一步:
Please go to <FreshBooks auth URL> and authorize access. Enter the authorization code:
命令
$ fbtimer --help Usage: fbtimer [OPTIONS] COMMAND [ARGS]... Options: -o, --stdout Enable logging to stdout. Helpful for debugging. -v, --verbose Enable debug logging. --version Show the version and exit. --help Show this message and exit. Commands: details Update timer details discard Stop and delete the current timer log Stop the timer and log it logout Log out and delete any authorization data. pause Pause current timer. show Show any currently running timers. start Start or resume timers. $ fbtimer start --help Usage: fbtimer start [OPTIONS] Start or resume timers. Options: -d, --details Fill out timer details when started. --help Show this message and exit.
用法示例
记录时间
# fbtimer No running timer # fbtimer start Timer started at 2:50 PM
做些工作。当您准备好登录时:
$ fbtimer Running: 0:25:39, started at 2:50 PM $ fbtimer details Recent Clients: 1. Internal (My Business) 2. Gordon Shumway 3. William Tanner 0. Go back $ 1 Setting client to Date Dude Update: 1. Client 2. Project 3. Service 4. Note 0. Quit $ 0 $ fbtimer log Your time has been logged
立即设置详细信息
# fbtimer start -d
Timer started at 2:50 PM
Recent Clients:
1. Internal (FreshBooks)
2. Jenn Kim
3. Date Dude
4. lolpdf (PDF Man)
0. Go back
休息一下
$ fbtimer pause
Timer paused
$ fbtimer
Paused: 0:15:43, started at 2:50 PM
$ fbtimer start // To resume
Timer started at 3:26 PM
没关系
$ fbtimer Running: 0:25:39, started at 2:50 PM $ fbtimer discard Discarding timer $ fbtimer show // Same as fbtimer No running timer