Home

tazzben edited this page Nov 3, 2012 · 5 revisions
Clone this wiki locally

Time.txt

Time.txt allows you to track and analyze your time (sheets) using plain text files.

Options:

-f “<File Path>”, —file=“<File Path>” Define the active file to analyze
-s “<File Path>”, —save=“<File Path>” Save output to a file
-i “<File Path>”, —import=“<File Path>” Define a file to import into the active file
-a ‘4-19-11:Worked on project #2.5 @category +project’, —add=‘4-19-11:Worked on project #2.5 @category +project’ Add a line to the active file

Examples:

The following command defines the active file and displays all time in the project “+project”

./ttime -f "~/time.txt" +project

Example Output:

4-19-2011:Install Server @warehouse #1.5 +project
4-25-2011:Printing job #.5 +project
Lunch with client +project #1

Total time: 3.00

Once I’ve defined the active file I don’t have to specify it unless I want to change that setting. In this next command I want to see items both in the project “+project” and in the category “@warehouse”.

./ttime +project and @warehouse

Example Output:

4-19-2011:Install Server @warehouse #1.5 +project

Total time: 1.50

This time I want see any entry that is in the category “@bob” or in the project “+project”. I also want to save the output to a text file instead of displaying it to the screen.

./ttime +project or @bob --save="results.txt"

Example Contents of results.txt:

4-25-2011: Time caused by Bob @bob #4
4-19-2011:Install Server @warehouse #1.5 +project
4-25-2011:Printing job #.5 +project
Lunch with client +project #1

This time I want any time in the project “+project” that happened after 4/20. I also want to save the output to a csv instead of displaying it to the screen.

./ttime +project and ">4-20-2011" --save="results.csv"

Example Contents of results.csv:

Date,Hours,Project,Category,Note
2011-04-25,.5,project,,Printing job

In this example I want to import the results.csv (you can also import plain text files) into my active file and display any item greater than 1 hour.

./ttime ">1" --import="results.csv"
4-19-2011:Install Server @warehouse #1.5 +project

Total time: 1.50

This time I simply want to add a line to my active file:

./ttime --add='4/20/2011: Spent some time shopping for equipment #2.5 @electronics +personal'

The Super Easy Way to Install (Macports)

You can install this application using MacPorts! Type the following:

sudo port -v selfupdate
sudo port install time.txt

This method takes care of all dependancies and can manage updates for you. For information on installing MacPorts, please visit their site.

Installing:

Installing time.txt is pretty easy. Because Macs and Linux already include Python, all you need to do is download the time.txt source, decompress it, and move it wherever you want. Of course, if you use time.txt a lot you might want to add your installation location to your PATH variable.

On Windows, you need to download Python 2.x and install it before installing time.txt. Or install the version of time.txt containing Python.

Download:

Windows (Zip file, Contains Python):https://github.com/tazzben/time.txt/blob/master/dist/time_dist.zip
Windows (Zip file): https://github.com/tazzben/time.txt/blob/master/dist/time.zip
Mac/Linux/Etc (tar.gz file): https://github.com/tazzben/time.txt/blob/master/dist/time.tar.gz