GTD: Improve integration in ThinkingRock

This article is about the way I organize myself (I happily follow the “Getting Things Done” metodology). To help me manage tasks and projects, I use ThinkingRock.

I have finished the infrastructure for integrating of external apps into TR (by using some scripting magic and the Notes field). At the moment it is a quick hack, but “it works for me (TM)” Razz

This article complements the KMail integration post which can be found here:

At the moment, I have integrated:

  • Freemind: For mind mapping and many other tasks (it is a very important app for my daily work)
  • Openproj: A MSProject like app for managing complex projects
  • TiddlyWiki: A very interesting tool for structured documentation

Adding new apps (openoffice, gimp, …) is really easy, as everything is done outside TR and without programming. I will come on this topic later.

I have just created a project/action in TR, and now I want to:

  • Attach a mindmap from an existing template very easily without bothering with filenames and folders
  • Attach a complex project from an existing template very easily without bothering with filenames and folders
  • Attach a new spreadsheet from an existing template very easily without bothering with filenames and folders
  • Keep everything related to the main project/action
  • Have all the docs available with a single click in the link
  • Easily create templates (for example I have a mind-map template with all the things I have to ask to a customer interested in elearning).
  • If I want to add 4 different files to an action, I just have to: launch the script, select the templates and press enter (this is not completely achieved at the moment Razz )
  • Everything must be safe (no modifying or reading the xml file) and must survive between updates of TR


On the TR side, the magic is done by linking to files in the “notes” field. This links are opened by xdg-open, which in fact calls the default application for the file. Nothing new here.

On the Linux side, there is a script (I have created an icon in my panel) which:
1) shows the available templates (you can select one or more)

2) asks for -optional- base names (names and paths are not important as they will be correctly linked from within TR)

3) creates folders to store the new files (it ensures there will be no collisions, so you can have many “Brainstorming” base names for different projects Smile ). You can choose a folder if you want, but I see no reason for that. This is done through an option’s window, which in many cases you can just accept the defaults and press enter.

4) creates new files based on copies from templates (mm, sxw, pdf, …) and puts them in the new folders

5) Shows a popup with the text you have to paste into TR


To find the available templates, the application looks into the TEMPLATES folder (see below). There it finds a folder for every template.

Inside every folder, there is a single file named exactly as the folder plus the corresponding extension (NOTE: This will probably be improved in future versions to be able to put more than one file on each template). You can edit the file with the corresponding application to adapt the template to whatever you want:

Obviously, you can put there whatever you want. Any kind of file.

In the end, the template file will be copied to the destination and renamed to the base name you choose.

THE CODE (and install steps)

1) Select all the text and paste it to a text file, named “” and assign execution rights (chmod 755

2) In the code, you will need to change:
- PROYECTOS: which points to a folder where you want to store all files and folders created
- TEMPLATES: which points to the templates folder

3) Create a shortcut available easily Razz

# Name: tr_integration v.0.1
# License: GPL v3
# Author: fmonera at opensistemas dot com


# List of items
for I in `ls $TEMPLATES`
WANTED=`kdialog –checklist “Select items to create:” $WANTEDLIST`
if [ "X$WANTED" == "X" ]

OPTIONS=`kdialog –checklist “Select options for this files:” $OPTIONLIST`
# Parse options
NEWFOLDER=`echo $OPTIONS | grep -c newfolder`
# end parse

# dir
if [ "X$NEWFOLDER" == "X1" ]
NOMBRE=`kdialog –inputbox “Base name for the folder (no special characters please):” temp_folder`
DIR=`mktemp -d –tmpdir=”$PROYECTOS/” “$NOMBRE.XXXX”`
if [ "X$NOMBRE" == "X" ]
DIR=`kdialog –getexistingdirectory $PROYECTOS`
if [ "X$DIR" == "X" ]

for I in $WANTED
# Unquote
I=`echo $I | cut -b 2- | cut -d’”‘ -f1`
# Create documents
NOMBRE=`kdialog –inputbox “Base name for <b>$I</b> (no special characters please):” $NOMBRE`
echo “DIR: $DIR”
SOURCE=`find $TEMPLATES/$I -type f`

# Format TR Text
for I in `ls $DIR`
FORMAT=`basename $I “.$EXT” | sed ’s/_/ /g’`
TEXTO=”$TEXTO  · $EXT: [file:$DIR/$I|$FORMAT]”

kdialog –textinputbox “Paste into ThinkingRock:” “$TEXTO” &

You will need kdialog and mktemp. Both are available in every unix system I know.

It might work in Windows and/or MAC if you install KDE4 and adapt a bit the code. You will probably need Cygwin or, at least, mktemp for your environment. I don’t see major problems for that. Sorry, no support for Windows as I am a free software man since 1997 Smile