Other Systems

KOrganizer

KTimetracker, like KOrganizer and Apple's iCal, uses the industry standard iCalendar format for its data. KTimetracker can read and write the to-do lists created by these two applications.

You can even work synchronously on one file with KOrganizer and KTimetracker. If one program changes the file, the updates will be propagated to the other application automatically.

Planner

As a typical usecase, you might want to plan a project with the project management tool Imendio Planner (from live.gnome.org/Planner) and import its tasks to KTimetracker with FileImportImport Tasks From Planner..., to have them in the industry standard iCalendar format. Having done so, you are able to schedule the tasks in KOrganizer, and account your time to them in KTimetracker. That's one way to help ensure your project stays on time and under budget.

D-Bus

D-Bus is the mechanism KDE programs use to communicate with each other. A KDE program provides a list of functions that other programs (a Bash script, for example) can use.

Example 2.1. Bash script that echoes KTimetracker's version

qdbus org.kde.ktimetracker /KTimeTracker version 2>/dev/null || echo "ktimetracker not running"

KTimetracker's current D-Bus interface is currently used mainly for automated testing, so it is very limited. For the full interface definition, see D-Bus Interface Appendix.

To see the full D-Bus interface of the KTimetracker version installed on your system, run the following Bash script:

Example 2.2. List KTimetracker's D-Bus interface to console

qdbus org.kde.ktimetracker /KTimeTracker 2>/dev/null || echo "ktimetracker not running"

Export Totals to CSV

KTimetracker can export both totals and history to a comma-delimited file format. To export totals, select FileExportExport Times... and KTimetracker displays the following export dialog:


KTimetracker CSV Export Dialog

Enter the filename that you would like to export the data to, and modify the other dialog defaults if necessary. Click Export and KTimetracker exports the totals for all tasks to the file you selected.

Use the Export to Clipboard button to export the times to the clipboard

Here is an example of the output format:



"kde",,,,,0.00,0.00,6.88,9.83
,"ktimetracker",,,,6.88,8.70,6.88,9.83
,,"3.2 feature plan",,,0.00,0.00,0.00,0.00
,,"bugs",,,0.00,1.13,0.00,1.13
,,"checkin changes - translation strings",,,0.00,0.00,0.00,0.00
,,"time card report",,,0.00,0.00,0.00,0.00
,"kopete",,,,0.00,0.00,0.00,0.00
,"promo",,,,0.00,0.00,0.00,0.00
,"web stuff",,,,0.00,0.00,0.00,0.00

Top-level tasks are output in the first column, sub-tasks in the second, and so on. The time data is output after the maximum task depth (five in this example). The first time column is Session Time, the second is Time, the third is Total Session Time and the fourth is the Total Time.

Export History to CSV

To export task history, select FileExportExport History... and KTimetracker displays the same export dialog as shown above.

Enter the filename that you would like to export the data to, and select a date range that you want the task history to cover. Modify the other dialog defaults if necessary. Click Export and KTimetracker exports the task history to the chosen file.

Use the Export to Clipboard button to export the history to the clipboard.

Here is an example of the output format:



Task History
From Tuesday 06 July 2004 to Tuesday 13 July 2004
Printed on: 2004-07-13 18:10
2004-07-06,2004-07-07,2004-07-08,2004-07-09,2004-07-10,2004-07-11,2004-07-12,2004-07-13,
,,,,,,,,0.00,"kde"
,,1.77,3.23,1.73,,1.37,0.82,8.95,,"ktimetracker"
,,,,,,,,0.00,,,"3.2 feature plan"
,1.13,,,,,,,1.13,,,"bugs"
,,,,,,,,0.00,,,"checkin changes - translation strings"
,,,,,,,,0.00,,,"time card report"
,,,,,,,,0.00,,"kopete"
,,,,,,,,0.00,,"promo"
,,,,,,,,0.00,,"web stuff"

The first three lines identify when the report was generated and for which date range. The fourth row is a comma-delimited list of the dates in the date range, in ISO 8601 format (YYYY-MM-DD). All subsequent rows list the time logged against each task. The last numeric column is the row total across all days. The task name prints after the total column, and is indented to indicate the task/sub-task relationship. Top level task names appear in the first column after the total.