Skip to content
Bytekeeper edited this page Dec 6, 2014 · 12 revisions

Available commands

on
on [comment] [timespec] creates a new time tracking item with the current time as start time and the given comment. To write multi line comments, just add \n where the line break should be (two backslashes to escape the backslash for the used shell).

timespec can be one of [since] X [min|s|h] ago, since [HH:mm:ss|HH:mm] [ago] or [from] HH:mm[:ss] to HH:mm[:ss] or from HH:mm[:ss] or [since|at] HH:mm[:ss] until HH:mm[:ss]

Examples:
stt on my long multiline\\ncomment
stt on chess with Napoleon since 14:33
stt on chess with Napoleon since 15 minutes
stt on chess with Napoleon since 37 secs ago
stt on chess with Napoleon since 13:30:25 until 15:12:21 stt on chess with Napoleon 20 min ago
stt on chess with Napoleon 2 h ago
stt on chess with Napoleon from 12:00 to 14:00 stt on chess with Napoleon 13:30:25 to 15:12:21

report
report [X days|string|since yyyy-MM-dd] [--source (file | -)] [long] shows all tracked times for the current day grouped by their comment. If you want all times of the last 11 days, report 11 days would do the trick. report chess would output all tracked times where the comment contains "chess".

If parameter long is given (it has to be the last one in the line), then output will not be truncated to the value specified in the config file.

Normally, the report will be printed for items found in the configured .stt file. If another source should be used, the --source parameter is your friend which either reads from the given file or stdin when '-' is used.

Examples:
stt report
stt report chess
stt report 12 days
stt report 12 days long
stt report since 2013-01-01

search
search will output all comments ordered from newest to oldest. This is most (only?) useful for autocompletion of comments

Examples:
stt search

fin
fin [at time] stop tracking time for the current time tracking element. This sets the end time of the element to the current time. If time is given, it is used as end time of the element.

Examples:
stt fin
stt fin at 18:00

convert
convert (--sourceFormat (stt|csv|ti)) [--source (file | -)] [--target (file | -)] converts input (parameter --source) of the given format (parameter --sourceFormat) to the given target (parameter --target). Source and target may be absolute or relative paths to a file or '-' for standard in/standard out. --source and --target default to standard in/out. The formats for importing currently are

  • stt for STT internal format
  • csv for semicolon delimited, 9 fields CSV format where the 2nd field has to be the date, the 5th field the duration and the 9th field the comment . This might get more flexible in the future if the need should arise
  • ti for custom ti format.

The convert command is mostly useful for importing time tracking items of other programs or displaying a report from the items of other programs.

Examples:
cat the_csv_file.csv | stt convert --sourceFormat csv --source - --target -
(stt convert --sourceFormat csv --source the_csv_file.csv --target -; cat ~/.stt) > ~/.stt_merged this writes the items from the_csv_file.csv as well as the contents of ~/.stt into ~/.stt_merged
curl http://example.com/some_csv_file.csv | iconv -t UTF-8 -f ISO-8859-15 | stt convert --sourceFormat csv | stt report since 2014-01-01 --source - | less print a report of all items since the beginning of 2014 of a .csv file in ISO-8859-15 format downloaded from some URL. This was the reason for writing a converter in the first place ;-)

Remarks

Each command can be abbreviated as long as it is not ambiguous. This means that you can write stt f instead of stt fin.

The examples above assume that you created a script named "stt" which calls the CLI of SimlpeTimeTrack.

Clone this wiki locally