47

我正在寻找在终端中运行并允许我跟踪时间的东西。我希望它是开源的,但这不是必需的。

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

4

9 回答 9

33

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

$ 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:http: //github.com/samg/timetrap

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

于 2009-11-15T03:15:25.883 回答
15

一个真正的基本的将是

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

如果你想稍后处理它,如果你这样做date +%s或者date +%F%T.

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

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

您真正想做的一些提示可能会有所帮助。

于 2008-12-29T19:32:13.473 回答
13

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

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

更多任务战士工具在这里

于 2009-11-17T17:53:29.340 回答
6

你可以使用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.
于 2008-12-29T21:08:23.687 回答
3

如果你使用 todo.txt-cli,你应该考虑使用Python 编写的打卡时间跟踪。

于 2010-06-14T21:51:23.590 回答
2

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

作者网站上的更多详细信息:http: //timetracker.plix.at/

于 2011-11-01T10:09:06.153 回答
1

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

http://ajy.co/2010/worklog-a-simple-time-tracking-program/

于 2012-02-01T15:41:50.743 回答
0

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

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

并与通常的嫌疑人(grep,awk,...)一起处理。

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

于 2008-12-29T19:36:27.350 回答