views:

848

answers:

7

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.

+1  A: 

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.

Charlie Martin
omg i was so gonna troll with this but you beat me!
A: 

Depends on the information you want to time track. In one company we had just to track our total working times a day (tax/social insurance purpose). The easieast solution was: last. More granular you could just do something like

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

and procsessing with the usual suspects (grep, awk, ...).

When you need even more functionality, I dont know anyone which works without a gui.

flolo
+2  A: 

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.
martinus
Thanks, this does what I want. I'd like to have the results stored in a database but it shouldn't be hard to write a perl script to go through the files and add the data to an SQLite database.
Jared
+5  A: 

TimeTrap. It's simple and lightweight, and somewhat intuitive to use.

$ 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

It's written in ruby an available as a gem on gemcutter or on github: http://github.com/samg/timetrap

A similar tool written in python is called TimeBook and available on bitbucket.

samg
A: 

This question is old, but since is still open... I recently discovered TaskWarrior, which is purely CLI but quite feature-rich.

HTH.

mac
This isn't about tracking time, but rather tracking tasks, is it?
blueyed
A: 

If you use todo.txt-cli, you should consider using punch time tracking, written in Python.

treehead