Open source 最佳命令行时间跟踪应用程序?

Open source 最佳命令行时间跟踪应用程序?,open-source,command-line,time-tracking,Open Source,Command Line,Time Tracking,我正在寻找一种可以在终端上运行并可以跟踪时间的东西。我希望它是开源的,但这不是必需的 我发现的大多数时间跟踪应用程序都是基于web或gui的,输入数据的时间比我想要的要长。一个真正的基本应用程序是 $ echo `date`": what I'm doing now" >> timelog.txt 如果您想稍后处理它,那么将其设置为date+%s或date+%F%T会更容易 您可以将其包装为shell脚本: #!/usr/bin/bash - echo `date +%s` $*

我正在寻找一种可以在终端上运行并可以跟踪时间的东西。我希望它是开源的,但这不是必需的


我发现的大多数时间跟踪应用程序都是基于web或gui的,输入数据的时间比我想要的要长。

一个真正的基本应用程序是

$ echo `date`": what I'm doing now" >> timelog.txt
如果您想稍后处理它,那么将其设置为
date+%s
date+%F%T
会更容易

您可以将其包装为shell脚本:

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

一些关于你真正想做什么的提示可能会有所帮助。

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

echo -e -n `date`\tProjectName\tTask\tComment >> MyTimeTable.txt
...whatever...
echo -e \t`date` >> MyTimeTable.txt
和通常的嫌疑犯(grep,awk,…)打交道

当您需要更多功能时,我不知道有谁可以在没有gui的情况下工作。

您可以使用:

wtime[-t任务][]
-t任务
指定任务的名称。它必须是有效的文件-
名称只考虑前32个字符。
默认值为“default”。
行动是下列行动之一:
-显示帮助。
-开始计数。
-让我们停止计数。
-c以秒为单位显示当前经过的时间。
-r[开始[结束]]
显示指定时间内任务所花费的时间
时期参数start和end表示
报告期的开始和结束-
非常感谢。开始和结束的格式为“%d-%m-%Y”
(见strptime(1))。默认值为cur-
租赁时间为结束和当前的行将结束
开始参数的月份。

时间陷阱。它简单、轻巧,使用起来有些直观

$ 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上可以作为gem使用:

用python编写的类似工具称为TimeBook,可在bitbucket上使用。

我最近发现,它纯粹是CLI,但功能非常丰富

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

  • (网络界面)
  • (安卓应用程序)
更多taskwarrior工具。

Emacs


如果您使用todo.txT-clii,您应该考虑使用Python编写。

APP::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

作者网站的更多详细信息:

我最近开始使用Worklog,它看起来非常简单和直接


并提供您不喜欢的应用程序的示例。@Jared-这个问题很老了。。。但我想知道:你最终使用了推荐的软件吗。。。还是你选择了别的?天哪,我本来想用这个来捣乱的,但是你打败了我!谢谢,这正是我想要的。我希望将结果存储在数据库中,但编写一个perl脚本来遍历文件并将数据添加到SQLite数据库应该不难。如果它能够以小时而不是秒来报告时间,那就太好了。这不是关于跟踪时间,而是跟踪任务,是吗?@blueyed-我不明白其中的细微差别。TaskWarrior让您跟踪在给定任务上花费的时间(时间跟踪器?)。。。或者你把时间花在了什么任务上(任务跟踪器?)。但最终改变的是什么。。。或者我遗漏了什么?我曾考虑过只将TaskWarrior用于任务跟踪(您只需添加任务或将其标记为完成),但在处理任务时不进行跟踪。这也许是可能的@blueyed-几个月前我换了工作,不再使用taskwarrior(现在我更像是仓鼠了…),但据我记忆所及,你可以做你想做的事。taskwarrior没有回答这个问题,我不知道为什么这个答案会被如此高估。不过,还有一个可以与taskwarrior接口的。普通Taskwarrior无法跟踪您在任务上花费的时间,因为这不是它的目的。该死的慢,但很棒。文章不见了:/
~$ 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