Open Source Musings The thoughts, ideas, and opinions of an open source guy

Getting that wiki feeling on the desktop with Zim

'Wiki' spelled out with keyboard keys and with pens and pencils pointing at it

There’s no denying that a wiki can be an very useful piece of software. You can do so much with one — write notes and drafts, collaborate on projects, even build complete websites. And more.

I’ve used more than a few wikis in the past, either for my own work or at various contract and full-time gigs I’ve held. While traditional wikis are fine, I really like the idea of desktop wikis. They’re small, easy to install and to maintain, and easy to use. And, as you’ve probably guessed, there are a number a desktop wikis available for Linux.

Let’s take a look at one of the better desktop wikis: Zim.

Getting going

You can either download and install Zim from the software’s Web site, or do it the easy way and install it through Synaptic. Once it’s installed, start it up.

A key concept in Zim is notebooks. They’re like a collection of wiki pages on a single subject. When you first start Zim up, it asks you to specify a folder for your notebooks and the name of a notebook. Suggests Notes for name, and ~/Notebooks/ for the folder. Change that if you want.

Adding a notebook to Zim

When you set the name and the folder for your notebook, click OK. You get what’s essentially a container for your wiki pages.

An empty notebook

Adding pages to a notebook

So you have a container. Now what? You start adding pages to it, of course. To do that, select File > New Page.

Adding a new page to a Zim notebook

Enter a name for the page, and then click OK. From there, you can start typing to add information to the page.

A new wiki page

Zim has a number of formatting options, including:

  • Headings
  • Character formatting
  • Bullet and numbered lists
  • Checklists

You can also add images and attach files to your wiki pages, and even pull in text from a text file.

Zim’s wiki syntax

You’re not limited to using the toolbar and menus to add formatting to a page. If you’re old school, you can also use wiki markup.

The markup that Zim uses is based on the markup that’s used with DokuWiki. It’s essentially WikiText with a few minor variations. To create a bullet list, type an asterisk. Surround a word or a phrase with two asterisks to make it bold.

If you have a number of pages in a notebook, you can easily link between them. There are two ways to do that.

The first way is to use CamelCase to name the pages. Let’s say I have a notebook called Course Notes. I can name the notebook for my JavaScript course JavascriptCourse and when I want to link to it from another page in the notebook, I just type JavascriptCourse and press the space bar. Instant hyperlink.

The second way is to click the Insert Link button on the toolbar. Type the name of the page that you want to link to in the Link to field, then select it from the list of options that displays, and then click Link.

Inserting a link

I’ve only been able to link between pages in the same notebook. Whenever I’ve tried to link to a page in another notebook, the file (which has the extension .txt) always opens in a text editor.

Exporting your wiki pages

There might come a time when you want to use the information in a notebook elsewhere — say, in a document or on a web page. Instead of copying and pasting, and losing formatting, you can export your notebooks pages to one of the following formats:

  • HTML
  • LaTeX
  • Markdown
  • ReStructuredText

To do that, click on the wiki page that you want to export. Then, select File > Export.

The first export window

Decide whether to export the whole notebook or just a single page, then click Forward.

The second export window

Select the file format that you want to save the page or notebook as. With HTML and LaTeX you can choose a template to use. Play around to see what works best for you. For example, if you want to turn your wiki pages into HTML presentation slides, you can choose SlideShow_s5 from the Template list.

Click Forward. If you’re exporting a notebook, you can choose to export the pages as individual files or as one file. You can also point to the folder where you want to save the exported file.

The final export window

Is that all Zim can do?

Not even close. Zim also has a number of plugins that expand its capabilities. It even packs a built-in web server that lets you view your notebooks as static HTML files. This is useful for sharing your pages and notebooks on an internal network.

All in all, Zim is a powerful yet compact tool for managing your information. It’s easily the best desktop wiki I’ve used, and it’s one that I keep going back to.

Thoughts? Let's start a conversation on Twitter.

Did you enjoy this post or find it useful? Then please consider supporting this blog with a micropayment via Liberapay. Thanks!