2008-12-29 70 views
37

我正在寻找在终端中运行的东西,并允许我跟踪时间。我希望它是开源的,但这不是必需的。最佳命令行时间跟踪应用程序?

我发现的大多数时间跟踪应用程序都是基于Web或基于GUI的,并且需要更长的时间才能输入数据,然后我想要。

+0

请指定操作系统。 – 2008-12-29 19:17:01

+0

,并提供您不喜欢的应用程序示例。 – 2008-12-29 19:32:09

+0

@Jared - 这个问题很古老......但我想知道:你最终使用了任何建议的软件吗? ...还是你选择了其他东西? – mac 2011-07-03 00:10:30

回答

11

一个真正的基础之一将是

$ echo `date`": what I'm doing now" >> timelog.txt 

如果您想稍后处理它,如果你作出这样的date +%sdate +%F%T更容易。

你可以换,作为一个shell脚本:

#!/usr/bin/bash - 
echo `date +%s` $* >> ~/timelog.txt 

的你真正想做的事情可能会帮助一些提示。

+2

omg我是如此巨大,但你击败了我! – 2008-12-29 21:12:43

1

取决于您想要跟踪的信息。在一家公司,我们只需跟踪每天的总工作时间(税收/社会保险目的)。最简单的解决方案是: last。更精细的你可能只是做类似

echo -e -n `date`\tProjectName\tTask\tComment >> MyTimeTable.txt 
...whatever... 
echo -e \t`date` >> MyTimeTable.txt 

和procsessing与通常的嫌疑人(的grep,awk中,...)。

当你需要更多的功能时,我不知道任何人在没有gui的情况下工作。

5

你可以使用wtime

wtime [ -t task ] [ <action> ] 

-t task 
    Specify the name of the task. It has to be a valid file- 
    name. Only the first 32 characters are taken into account. 
    The default value is "default". 

action is one of the following: 

-h Display help. 

-a Start counting. 

-s Stop counting. 

-c Display current elapsed time in seconds. 

-r [ start [ end ]] 
    Display time spent on the task during the specified 
    period. The parametres start and end represent the 
    begginning and end of the reporting period respec- 
    tively. The format of start and end is '%d-%m-%Y' 
    (see strptime (1)). The default values are the cur- 
    rent time for end and the begginning of the current 
    month for the start parameter. 
28

TimeTrap。它简单轻便,使用起来有点直观。

$ t switch World Domination Plan 
$ t in --at "5 minutes ago" Research Volcano Islands 
$ t out 
$ t display 
Timesheet World Domination Plan: 
Day   Start  End  Duration Notes 
Mar 14, 2009 19:53:30 - 20:06:15 0:12:45 Research Volcano Islands 
Total        0:12:45 

它是Ruby编写的可作为gemcutter或在GitHub上的瑰宝: http://github.com/samg/timetrap

用Python编写的一个类似的工具被称为TimeBook和可用的到位桶。

13

我最近发现了TaskWarrior,它纯粹是CLI,但功能丰富。

编辑2015年6月:自从我多年前写了这个回答以来,taskwarrior已经在一个有很多功能和集成的真棒项目中发展起来。在我最喜欢的有:

更多taskwarrior工具here

1

应用:: TimeTracker - 易扩展的基于命令行的时间跟踪

~$ cd work/some_project 
~/work/some_project$ tracker start 
Started working on some_project at 13:06:20 
~/work/some_project$ # hack ... hack ... hack 
~/work/some_project$ tracker stop 
Worked 00:15:42 on some_project 

~/work/some_project$ cd ../other_project 
~/work/other_project$ tracker start 
Started working on other_project at 13:32:54 
~/work/other_project$ # hack some more 
~/work/other_project$ tracker current 
Working 00:35:31 on other_project 
Started at 13:32:54 

~/work/other_project$ tracker start --tag testing 
Worked 00:38:23 on other_project 
Started working on other_project (testing) at 14:11:27 
~/work/other_project$ # hack, then go for lunch 
~/work/other_project$ # ups, forgot to hit stop when I left 
~/work/other_project$ tracker stop --at 14:30 
Worked 00:18:33 on other_project (testing) 

~/work/other_project$ tracker report --this day 
work      01:12:38 
    some_project    00:15:42 
    other_project   00:56:56 
total     01:12:38 

对提交网站进一步了解详细:http://timetracker.plix.at/