TreeLine: Outliner meets free-form database

829

Author: Dmitri Popov

TreeLine is a hybrid application that combines the features of a traditional outliner with a free-form database. As such, it offers a unique way to organize heterogeneous data, be it contact information, bookmarks, text snippets, bibliography, task lists, or something else. Moreover, using TreeLine’s outlining capabilities you can easily group and manage the mixed data inside the database.

TreeLine is written in Python, so you have to make sure that Python is installed on your machine. Besides Python, TreeLine requires a few other software packages, including Qt, PyQt, and an XML parser (see the Requirements page for more detailed info). If you are using Ubuntu 7.04 (Feisty Fawn), you don’t have to install anything besides the application itself, since all the required components are already there.

To install TreeLine, download the latest package and unpack it. Fire up the terminal, switch to the TreeLine directory, and run python install.py as root. When that operation finishes, you can launch the application by running the treeline command.

To better understand how TreeLine works, let’s create a simple to-do database to keep track of daily tasks. Launch TreeLine and create a new file by choosing File -> New. TreeLine’s main window is divided into two panes. The Outline pane to the left lets you manage nodes in the tree structure of the currently opened database, while the Editing pane to the right lets you edit the nodes and their content. The Editing pane has three tabs at the bottom: Data Output (displays the current node in the view mode), Data Editor (used to edit data in the node), and Title Lists (lists all the nodes in the database).

Each node in TreeLine belongs to a specific data type containing a set of user-defined fields. For example, you can create a data type called Notes containing three fields: Notes, Date, and Author. When you create a new node, you can assign the Notes data type to it, effectively turning it into a note record.

When you create a database, it contains only one default node named Main. Its data type is ROOT, and it has only one field, called Name. Obviously, to make your TreeLine file useful, you have to define additional data types. To do this, choose Data -> Configure Data Types.

Click to enlarge

For our purposes, create a new data type called Task that contains several fields to keep track of to-dos (e.g. Name, Description, Due, Priority, and Notes). To create the Task data type, press the Modify List button in the Data Types section, press the New button, enter the name of the new data type, and press OK. Next, you have to add fields to the created data type. Press the New Field button in the Fields section, enter a name, and press OK.

By default, every new field’s type is set to text, which works fine for fields like Title, Description, and Notes. However, TreeLine offers a few other field types, including Date, Time, Choice, URL, Email, and Picture. This gives you the ability to create flexible data types. For example, you can set the Priority field to the Choice type (press the Field Type button and select Choice from the Field Type drop-down list) and specify the available list items (e. g. Low/Medium/High) in the Output Format section.

There are also a few other options you can specify for each field type. You can, for instance, enable rich HTML text editing in the Notes field and set its size to 7 lines. To do this, create the Notes field, press the Field Type button, then press the Advanced button, and enable the appropriate options.

In the data type configuration dialog window, you can also define the default child data type for each field. This feature allows the system to automatically set the child node’s data type depending on the data type of its parent. Let’s say that each task in your to-do database can be divided into subtasks. For example, you may have a task called “TreeLine article,” which you can divide into several subtasks, like Introduction, Article, and Conclusion. First, create a new Subtask data type and a set of fields (e. g. Name and Completed). Select Task from the Data Type list, then select Subtask from the Default Child Type drop-down list. Next time you add a node to the current task, the new node’s type will be automatically set to Subtask.

Once you’re done adding fields, you might want to specify the way the content of the nodes is displayed in the view mode. To do this, create a template by moving the desired fields to the Output Format window. The result may look like this (note that you can use HTML for rich formatting):

  <b>{*Name*}</b> - <font color="red">Due: {*Due*}</font>
  <hr>
  <b>Priority:</b> {*Priority*}
  <b>Description:</b> {*Description*}
  <b>Notes:</b> {*Notes*}

Later, when you click on the Data Output tab in the Editing pane, you’ll see the content of the currently selected node formatted according to the specified template.

Now you can actually start using your task manager. If you’ve ever worked with an outliner, you’ll feel at home with TreeLine. The application offers all the basic features to add parent and child nodes, move them around, and indent and unindent nodes.

TreeLine also has a few clever tricks up its sleeve. Using the Export feature, you can export your database into different formats, including HTML, tab-delimited text, generic XML, XBEL, and Mozilla bookmarks. The latter two can be particularly useful if your database contains bookmarks and you want to add them to your browser or share them with others.

Filters are another powerful feature that can help you to manage data. For example, if your to-do list contains hundreds of tasks and subtasks, you can quickly locate the tasks you need by specifying a filter. For instance, you can create a filter that displays all the tasks containing the word “article” in the title. To do this, choose Data -> Filter Data and create the following rule: Title contains “article.” You can define as many rules as you need, which allows you to create advanced filters. Besides filters, you can use TreeLine’s powerful sorting capabilities to keep tabs on the nodes.

Finally, TreeLine allows you to encrypt the file (Tools -> File Options -> Use file encryption), which can come in handy if you want to store confidential data like passwords and account information in a TreeLine database. According to the developer, the encryption mechanism in TreeLine uses the SHA hash function as a stream cipher, and should be fairly secure.

Final word

Don’t let TreeLine’s simplistic appearance fool you: it’s a competent tool that is powerful enough to help you manage virtually any type of data.