RTT – Ruby Time Tracker
RTT is a tool for tracking time. It’s primary extend is to be used from command line. It could be used by simple typing:
How to start a task?
$ rtt '<task-name>' ( or the more explicit way: 'rtt start <task-name>')
That simple!
If you start a task with the same name as one already stored for the very same day, then both task will be merged (suming the time of each one of those).
If no is specified the last paused one is activated, otherwise a task with ‘Default task’ name would be created.
Then to stop the timer, you can do:
$ rtt stop | pause | resume (if there is a paused task)
Each new task belongs to a the current Project, Client and User. If there isn’t any of those already configured, then the system will create them for you (you can change them later). Read ‘More about the API’ section.
Installation
[sudo] gem install rtt
After installing the gem you will need to setup some basic information of yours (data to be printed in the reports). With the following command:
$ rtt configure user [<user-nick-name>]
Then you will be prompt for First name, Last name, country, city, e-mail, site, etc. Information that will be used to fill-in the reports.
The only required field is the Nickname, which identifies the user.
Note: This configuration step is not required, but if you don’t do this your reports will lack any personal information.
More about the API
To configure the current Project, Client or Task you can use an analogous command:
$ rtt configure project [<project-name>] || rtt configure client [<client-name>] || rtt configure task [<task-name>]
After which, you’ll be prompted for the attributes for those models.
If you just want to change the current project. You can do this:
$ rtt project <project-name>
Anagolous, you can change the current Client by typing:
$ rtt client <client-name>
To list all task you can use
$ rtt list
Also, if you have added times for different projects or clients and you may want to filtered this list by one of those dimensions. Then you can do that, by using environment variables like this:
$ CLIENT=MyClient PROJECT=SomeProject rtt list
This command will list all tasks that belongs to the client called ‘MyClient’ and to the project called ‘SomeProject’.
Report
RTT allow you to build a pdf document with all the entries using the following command:
$ rtt report <output-filename>
Also, you can filter the entries of this report in a similar manner as you would do for ‘list’ command. For example:
$ PROJECT=SomeProject rtt report
This will generate a report for the project ‘SomeProject’.
$ FROM=20-01-2010 TO=25-01-2010 CLIENT=SomeClient rtt report
The output for this command will produce a report only for the task started after 20th of January and before 25th of January and also that were produced for the client called ‘SomeClient’.
Also, You could filter not for a date range, but for a specifc date and/or for a user nickname, like this:
$ DATE="20-01-2010" NICKNAME="marklazz" rtt report /home/marcelo/some_filename.pdf
Final thoughts
Enjoy!
Questions/Comments
Feel free to email Marcelo Andrés Giorgi Martínez for any comment or question.