2008-12-29 31 views
37

Estoy buscando algo que se ejecute en una terminal y me permita rastrear el tiempo. Me gustaría que fuera de código abierto, pero eso no es necesario.¿Mejor aplicación de seguimiento de tiempo de línea de comandos?

La mayoría de las aplicaciones de seguimiento del tiempo que he encontrado están basadas en la web o en la interfaz gráfica de usuario y me gustaría tomar más tiempo para ingresar datos.

+0

especifique el sistema operativo. –

+0

y proporciona ejemplos de las aplicaciones que no te gustan por favor. –

+0

@Jared - Esta pregunta es muy antigua ... pero me pregunto: ¿finalmente usó alguno de los softwares sugeridos? ... o elegiste algo más? – mac

Respuesta

11

una de verdad básica sería

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

Si desea procesar más tarde, es más fácil si usted hace que date +%s o date +%F%T.

Se podría concluir que a medida que un script de shell:

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

algún indicio de lo que realmente quiere hacer podría ayudar.

+2

omg ¡Estaba tan troll con esto pero me ganaste! –

1

Depende de la información que desee rastrear. En una compañía solo teníamos que hacer un seguimiento de nuestro tiempo total de trabajo por día (impuesto/seguro social). La solución más fácil fue: last. Más granular usted podría hacer algo como

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

y procsessing con los sospechosos habituales (grep, awk, ...).

Cuando necesite aún más funcionalidad, no conozco a nadie que funcione sin una interfaz gráfica de usuario.

5

Usted podría utilizar 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. 
+0

Gracias, esto hace lo que quiero. Me gustaría tener los resultados almacenados en una base de datos, pero no debería ser difícil escribir un script en perl para revisar los archivos y agregarlos a una base de datos SQLite. – Jared

+0

sería bueno si pudiera informar el tiempo en horas y no en segundos. – cmcginty

28

TimeTrap. Es simple y ligero, y algo intuitivo de usar.

$ 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 

Está escrito en Ruby una disponible como una joya en un tallador de gemas o en github: http://github.com/samg/timetrap

Una herramienta similar escrito en Python se llama TimeBook y disponible en bitbucket.

13

Recientemente descubrí TaskWarrior, que es puramente CLI pero bastante rico en funciones.

EDITAR Junio ​​de 2015: Desde que escribí esta respuesta hace años, taskwarrior se ha desarrollado en un proyecto increíble con muchas características e integraciones. Entre mis favoritos están:

Más herramientas taskwarrior here.

+4

No se trata de tiempo de seguimiento, sino de tareas de seguimiento, ¿o sí? – blueyed

+1

@blueyed - No entiendo la sutileza de la diferencia. TaskWarrior te permite hacer un seguimiento de la cantidad de tiempo que pasas en una tarea determinada (¿rastreador de tiempo?) ... o a qué tareas dedicaste tu tiempo (rastreador de tareas?). Pero, ¿qué cambia en última instancia? ...¿O me estoy perdiendo algo? – mac

+1

He pensado en usar TaskWarrior solo para el seguimiento de tareas (donde solo agrega tareas o marcarlas como finalizadas), pero no realizo un seguimiento cuando está trabajando en ellas. Esto podría ser posible sin embargo ?! – blueyed

1

App :: TimeTracker - el tiempo de seguimiento fácilmente extensible basada línea de comandos

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

más detalles sobre el sitio de los autores: http://timetracker.plix.at/

+0

maldito sloooooow, pero genial. – theist

Cuestiones relacionadas