3 个版本 (破坏性更新)
使用旧的 Rust 2015
0.3.0 | 2016年8月30日 |
---|---|
0.2.0 | 2016年8月30日 |
0.1.0 | 2016年8月26日 |
#560 在 日期和时间
44KB
825 代码行
Timmy
Timmy 是一个时间跟踪器。目前它并不特别稳定,甚至写得不太好!例如,解析英文日期(例如,“昨天 12:00”)可能会有错误。如果您想安装它,请运行
matt@box:~/$ cargo install timmy
并确保 ~/.cargo/bin
或等效路径在您的 PATH 中。
示例用法
可以使用 new 命令创建一个新的项目。标签用逗号分隔。
matt@box:~/$ # Creating a new project called timmy with the customer 'me' and tags 'rust,cli'
matt@box:~/$ timmy new timmy -c me -t rust,cli
您可以通过以下方式获取项目列表
matt@box:~/$ timmy projects
┌───────┬──────────┬──────────┐
│ Name │ Customer │ Tags │
├───────┼──────────┼──────────┤
│ timmy │ me │ cli,rust │
└───────┴──────────┴──────────┘
您可以使用 timmy track 开始跟踪。您可以可选地添加一个起始点或起始和结束点以添加一些忘记跟踪的时间。
matt@box:~/$ timmy track <project>
matt@box:~/$ # Starting time
matt@box:~/$ timmy track <project> -s "12:00"
matt@box:~/$ # Starting time and end
matt@box:~/$ timmy track <project> -s "12:00" -e "13:00"
Timmy 将监控您正在使用的程序,这可以通过传递 -n
来禁用。在会话结束时,Timmy 将自动查找当前目录中仓库中的任何 git 提交。如果您编辑历史记录(例如,撤消提交),您可以运行
matt@box:~/$ timmy git <project>
它将为项目重新填充提交。
要获取特定项目的所有信息,请使用 project 命令
matt@box:~/$ timmy project timmy
timmy
Tags: rust,cli
Total time spent: 14hrs 31mins
Program usage
98.97% emacs
1.03% gnome-terminal-
Activity
Thu 25 August 2016 17:55-18:02 6mins
* Print what commits have been found
* Add total time to activity printout
Thu 25 August 2016 17:44-17:54 9mins
* Add week flag to show activity in last week
Thu 25 August 2016 17:18-17:27 9mins
* Add support for dates like 20/08 to chronny
* Fix 20/08 date not being parsed
Thu 25 August 2016 16:32-17:15 42mins
* Add filtering activity by dates
* Add absolute dates to chronny
* Remove id from projects table
Wed 24 August 2016 14:09-14:30 21mins
* Add start and end options to track
* Add kitchen sink test for chronny
Tue 23 August 2016 20:35-21:24 48mins
* Add relative times
Tue 23 August 2016 15:47-17:12 1hrs 25mins
* Start writing a human datetime parsing lib
* Use i64 for row ids
* Automatically look for commits at the end of track
Tue 23 August 2016 15:28-15:46 18mins
Mon 22 August 2016 21:18-21:27 8mins: Example usage
* Extend readme with example usage
Mon 22 August 2016 20:30-21:04 34mins
* Add short weeks view
* Use debug! instead of error!
* Rename week command to weeks
* Stop projects panicing when project is not found
Mon 22 August 2016 15:38-17:47 2hrs 9mins
* Add total separator to week view
* Use tables lib in timmy
* Remove double bordering from tables
* First attempt at a tables lib
Mon 22 August 2016 14:50-15:33 42mins
* Add total to weeks view
* Move formatting a time difference into a function
* First version of weeks view
Mon 22 August 2016 14:20-14:41 20mins
Sun 21 August 2016 18:22-18:25 2mins: bugfixing
* Make total time display correct
Sun 21 August 2016 17:04-18:20 1hrs 15mins: Upload to github
* Add readme
* Make project view work with no timeperiods or tags
Sun 21 August 2016 15:49-16:03 13mins
* Remove abc
* Refactor project view
* Fix clippy warnings
* Rename SqliteError to Sqlite
Sun 21 August 2016 15:23-15:48 24mins: Clean up
Sun 21 August 2016 14:50-15:03 12mins: Total time on project vew
* Add total time to project view
Sun 21 August 2016 14:35-14:46 11mins: Fix projects list
* Fix projects view
Sun 21 August 2016 13:48-14:24 35mins: Project view
* Add tags to project view
* Move getting tags into query
* Add project view
Sat 20 August 2016 21:28-21:42 13mins: Project view
Sat 20 August 2016 20:06-20:47 41mins: Views
* Refactor printing a row into a function
* Implement projects list
Sat 20 August 2016 18:39-19:21 42mins: Views
Sat 20 August 2016 14:50-14:57 6mins: Test sqlites support for times
Sat 20 August 2016 13:45-13:59 13mins
* Use question mark instead of try!
* Add description to timeperiods
* Rename timeperiod to timeperiods for consistency
Sat 20 August 2016 13:40-13:41 0mins
Sat 20 August 2016 12:56-13:38 41mins
Fri 19 August 2016 19:18-19:58 39mins
Fri 19 August 2016 18:08-18:23 15mins
* Use own error type
Total: 14hrs 31mins
这相当长,因此您可以获取特定时间或日期之间的活动,如下所示
matt@box:~/$ timmy project timmy -s 22/08/16 -u 24/08/16
timmy
Tags: rust,cli
Total time spent: 14hrs 31mins
Program usage
98.97% emacs
1.03% gnome-terminal-
Activity
Wed 24 August 2016 14:09-14:30 21mins
* Add start and end options to track
* Add kitchen sink test for chronny
Tue 23 August 2016 20:35-21:24 48mins
* Add relative times
Tue 23 August 2016 15:47-17:12 1hrs 25mins
* Start writing a human datetime parsing lib
* Use i64 for row ids
* Automatically look for commits at the end of track
Tue 23 August 2016 15:28-15:46 18mins
Mon 22 August 2016 21:18-21:27 8mins: Example usage
* Extend readme with example usage
Mon 22 August 2016 20:30-21:04 34mins
* Add short weeks view
* Use debug! instead of error!
* Rename week command to weeks
* Stop projects panicing when project is not found
Total: 3hrs 37mins
您甚至可以使用英文日期描述,如下所示
matt@box:~/$ timmy project timmy -s "yesterday 12:00"
timmy
Tags: rust,cli
Total time spent: 14hrs 31mins
Program usage
98.97% emacs
1.03% gnome-terminal-
Activity
Thu 25 August 2016 17:55-18:02 6mins
* Print what commits have been found
* Add total time to activity printout
Thu 25 August 2016 17:44-17:54 9mins
* Add week flag to show activity in last week
Thu 25 August 2016 17:18-17:27 9mins
* Add support for dates like 20/08 to chronny
* Fix 20/08 date not being parsed
Thu 25 August 2016 16:32-17:15 42mins
* Add filtering activity by dates
* Add absolute dates to chronny
* Remove id from projects table
Total: 1hrs 8mins
您还可以按周查看项目的视图
matt@box:~/$ timmy weeks timmy
┌──────────┬───────┬─────────────┐
│ Week │ Day │ Time │
├──────────┼───────┼─────────────┤
│ 22/08/16 │ Mon │ 3hrs 56mins │
│ │ Tue │ 2hrs 32mins │
│ │ Wed │ 21mins │
│ │ Thu │ 1hrs 8mins │
│ ├───────┼─────────────┤
│ │ Total │ 7hrs 58mins │
├──────────┼───────┼─────────────┤
│ 15/08/16 │ Fri │ 55mins │
│ │ Sat │ 2hrs 40mins │
│ │ Sun │ 2hrs 57mins │
│ ├───────┼─────────────┤
│ │ Total │ 6hrs 33mins │
└──────────┴───────┴─────────────┘
依赖项
~27MB
~513K SLoC