【问题标题】:Best commandline time tracking application? [closed]最好的命令行时间跟踪应用程序? [关闭]
【发布时间】:2010-09-28 17:46:02
【问题描述】:

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

我发现的大多数时间跟踪应用都是基于 Web 或 gui 的,因此输入数据需要更长的时间。

【问题讨论】:

  • 并举例说明您不喜欢哪些应用。
  • @Jared - 这个问题很老了......但我想知道:你最后有没有使用任何建议的软件? ...或者您是否选择了其他任何东西?

标签: open-source command-line time-tracking


【解决方案1】:

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

$ 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 上找到。

【讨论】:

    【解决方案2】:

    一个真正的基本的应该是

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

    如果您想稍后处理它,则使用date +%sdate +%F%T 会更容易。

    你可以把它包装成一个 shell 脚本:

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

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

    【讨论】:

    • 天哪,我真想用这个来拖钓,但你打败了我!
    【解决方案3】:

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

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

    更多任务战士工具here.

    【讨论】:

    • 这不是跟踪时间,而是跟踪任务,是吗?
    • @blueyed - 我不明白差异的微妙之处。 TaskWarrior 让您跟踪您在给定任务上花费的时间(时间跟踪器?)......或者您将时间用于哪些任务(任务跟踪器?)。但最终会发生什么变化? ...还是我错过了什么?
    • 我曾考虑过仅将 TaskWarrior 用于任务跟踪(您只需添加任务或将其标记为已完成),但在处理它们时不要跟踪。不过这可能吗?!
    • @blueyed - 几个月前我换了工作并停止使用 taskwarrior(现在我更像是一个仓鼠人......)但据我所知,你可以做你想做的事。跨度>
    • Taskwarrior 没有回答这个问题,我不知道为什么这个答案会受到如此多的支持。不过有timewarrior,它可以与taskwarrior 交互。 Plain Taskwarrior 无法跟踪您在一项任务上花费的时间,因为这不是它的目的。
    【解决方案4】:
    【解决方案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.
    

    【讨论】:

    • 谢谢,这正是我想要的。我希望将结果存储在数据库中,但是编写一个 perl 脚本来遍历文件并将数据添加到 SQLite 数据库中应该不难。
    • 如果它能够以小时而不是秒为单位报告时间,那就太好了。
    【解决方案6】:

    如果你使用 todo.txt-cli,你应该考虑使用punch time tracking,用 Python 编写。

    【讨论】:

      【解决方案7】:

      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/

      【讨论】:

      • 该死的,但很棒。
      【解决方案8】:

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

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

      【讨论】:

      • 文章不见了:/
      【解决方案9】:

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

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

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

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

      【讨论】:

        猜你喜欢
        • 2016-07-17
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多