Best commandline time tracking application? [close

2020-05-13 13:49发布

I'm looking for something that runs in a terminal and allows me to track time. I'd like it to be open source but that isn't necessary.

Most time tracking apps I've found are either web or gui based and there for take longer to enter data then I'd like.

9条回答
甜甜的少女心
2楼-- · 2020-05-13 13:56

I recently started using Worklog, it seems pretty simple and straight forward.

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

查看更多
你好瞎i
3楼-- · 2020-05-13 13:59

I recently discovered TaskWarrior, which is purely CLI but quite feature-rich.

EDIT June 2015: Since I wrote this answer years ago, taskwarrior has developed in an awesome project with lots of features and integrations. Among my favourite there are:

More taskwarrior tools here.

查看更多
三岁会撩人
4楼-- · 2020-05-13 14:00

App::TimeTracker - the easily extendable command line based time tracker

~$ 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

Further details on the authors site: http://timetracker.plix.at/

查看更多
冷血范
6楼-- · 2020-05-13 14:04

a real basic one would be

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

If you want to process it later, it's easier if you make that date +%s or date +%F%T.

You could wrap that as a shell script:

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

Some hint of what you really want to do might help.

查看更多
女痞
7楼-- · 2020-05-13 14:09

You could use 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.
查看更多
登录 后发表回答