T-Bookmarks: Turn Thunderbird into a bookmark manager

Bookmarking to Go

Mozilla's Thunderbird offers tools that provide an alterative way to manage and customize your bookmarks. We'll show you how to put them to new and unconventional uses.

By Dmitri Popov

When it comes to managing bookmarks, we are spoiled. Besides Firefox's reasonably flexible bookmaking features, there are myriads of syncing utilities and web-based services that can take care of your bookmarks. del.icio.us (http://del.icio.us/), Ma.gnolia (http://ma.gnolia.com/), Markaboo (http://www.markaboo.com/), Google Browser Sync (http://www.google.com/tools/firefox/browsersync/), Foxmarks (http://www.foxmarks.com/), and many others - all offer useful features to help you keep tabs on your bookmarks.

They are all good at what they do, but this doesn't mean they suit everyone's needs perfectly. For example, with a web-based service, there is no guarantee that if the service goes down, it won't take all your stuff with it. A syncing tool is great for keeping bookmarks in sync on your own computers, but it's not much use on a public machine. Even if you've managed to work around these shortcomings, there are still other annoyances that can make you consider alternatives - like creating your own bookmarking solution based on Mozilla Thunderbird and a couple of nifty tools (let's call it T-Bookmarks). While it doesn't offer all the bells and whistles of a fancy social bookmark service (notably, you can use it to share your bookmarks with others), it does provide an alternative way of managing bookmarks, which you can customize and adjust to your needs. More importantly, it shows you how to put the proven technology to some new and unconventional uses.

Bookmarking pages with Toread

T-Bookmarks relies on two main components: Mozilla Thunderbird, which takes care of storing and managing bookmarks; and Toread (http://toread.cc/), an email bookmarking service that you use to add bookmarks to Thunderbird. Although Toread looks rather simplistic, it is actually an ingenious tool. Toread allows you to email any web page to yourself. In a way, it acts as an Email This Page feature, which is available on some websites, but you can send any page you like with just one click with Toread.

To enable the Toread service, go to http://toread.cc and enter your email address. You will then receive an email message with a link to a web page containing two bookmarklets [toread] and [toread+]. The latter allows you to add comments to the bookmarked page, and this is the one you should add to your browser by dragging the link onto the Bookmarks toolbar. You can add the bookmarklet to as many browsers as you like, which can be useful if you have several computers.

To bookmark the currently viewed page, click the [toread+] bookmarklet, type the desired text into the Comments field, and press OK. The page is automatically sent to your email address. Keep in mind that to effectively manage the bookmarked pages in Thunderbird, you should pay particular attention to what you type in the Comments field. Instead of descriptive comments, you should enter relevant key words (or tags, in Web 2.0 speak) that are used as filtering and grouping criteria in Thunderbird. For example, if you're bookmarking a page about setting up a Bluetooth GPRS connection on Knoppix, then you should use tags like "gprs", "bluetooth", "knoppix", "linux", etc.

Figure 1: Toread is an ingenious service that allows you to bookmark web pages.

Turning Thunderbird into a Bookmark Manager

Now it's Thunderbird's turn. You might not know this, but Thunderbird contains all the tools you need to manage bookmarked pages - they are just regular emails with embedded web pages, after all. First of all, you need to create a top folder for all emails coming from the Toread service and a filter that routes them to this folder.

To create a new folder, right-click your email account in the Folders pane and choose the New Folder menu item. Give the folder a name (for example, "To Read"), and press OK. Next, you have to create a filter that routes the incoming bookmarked pages to the To Read folder. To do this, you need to specify a simple rule based on the sender's address (assuming that you are using the Toread service). Choose Tools -> Message Filters, press the New button, and type the name of the filter in the Filter Name field. From the first drop-down list, select From, set the second drop-down list to "is", and type the appropriate email address (in this case, info@toread.cc) into the last field. In the Perform these actions section, select Move Message from the first drop-down list, and select the Toread folder from the second list.

The finished filter should look like the one in Figure 2. Press OK and make sure that the filter is enabled (the Active check-box should be ticked). If you already have emails from the Toread service in your Inbox, run the filter right away by pressing the Run Now button. This moves all the existing Toread messages into the To Read folder, and from now on any incoming email that matches the criteria specified in the filter will be automatically moved to the To Read folder.

Figure 2: Creating a filter in Thunderbird.

The next step is to group the bookmarked pages by subject, or whatever criteria you might want. While you can create a subfolder for each subject and create a filter for it, this approach has a few drawbacks. The most serious one is that you can't store a bookmarked page in two or more folders at the same time. For example, if you have subject folders like "Thunderbird", and "Encryption", you might want a page about how to encrypt emails in Thunderbird to appear in both. Fortunately, Thunderbird contains the Smart Folders feature (also called Virtual Folders and Saved Searches) that allows you to overcome the limitations of the folder-based approach.

Using Smart Folders, you can specify a set of search criteria, then save the search and view it as a conventional folder. The main difference here is that the smart folder is not a real folder and no messages are actually moved into it. In other words, the smart folder is just a virtual folder, and every time you select it, it runs the specified search and displays the results. This is indeed a powerful tool that allows you to build a sophisticated bookmark grouping system.

There are several ways to create a smart folder. The fastest way is to type your search criteria into the Quick Search field, then select Save Search as a Folder from the drop-down list. Alternatively, you can choose File -> New -> Saved Search and define a new search. This option allows you to create a saved search that includes subfolders and runs across multiple accounts. No matter which way you choose to create a smart folder, you can always modify its search criteria by right-clicking it and selecting the Folder Properties item.

To create a smart folder containing all the relevant bookmarked pages, you must define criteria based on the tags you enter in the Comments fields and that the Toread service inserts in the subject line. To create, for example, a smart folder with all Ubuntu-related bookmarks, choose File -> New -> Saved Search and specify the criteria as shown in Figure 3. With an IMAP account, be sure the Search Online box is ticked. Using T-Bookmarks with IMAP accounts has another advantage: you can sync your bookmarked pages on multiples machines with Thunderbird.

Figure 3: Creating a smart folder.

Figure 4: The T-Bookmarks solution in action.

Figure 5: Creating a new bookmarklet.

Plan B

A weak point of the bookmarking solution is that it relies on the Toread service. If the service folds, T-bookmarks becomes useless (until you have a plan B, that is). You can create your own bookmarklet to mail links to yourself. As you may know, a bookmarklet is just a bookmark, where the actual URL contains a JavaScript applet. In case you don't want to write an applet from scratch, here are a couple of ready-to-use examples. The following applet is simple. It opens your default email and creates a new email with a web page's title and link.


The second applet allows you to specify tags and include a text selection in the email's body.

javascript:void(document.location='mailto:my@address.com?subject='+'['+prompt('Tags:')+'] -'+' '+document.title+'&body='+document.location+''+escape(document.getSelection()))

Finally, if you prefer to use Gmail as your "bookmarking agent", then the following applet is the way to go.

javascript:(function(){m='http://mail.google.com/mail/?view=cm&fs=1&tf=1&to=&su='+encodeURIComponent('['+prompt('Tags:')+'] -'+' '+document.title)+'&body='+encodeURIComponent(document.location)+' '+escape(document.getSelection());w=window.open(m,'addwindow','status=no,toolbar=no,width=575,height=545,resizable=yes');setTimeout(function(){w.focus();}, %20250);})();

To create a new bookmarklet, right-click the Bookmark toolbar in Firefox and select New Bookmark. Enter a name for it in the Name field, and enter the JavaScript code in the Location field.

Final word

Obviously, T-Bookmarks is not the most sophisticated bookmark manager out there, but it has infinite flexibility. You can tweak it to make it fit your needs. Better yet, version 2.0 of Thunderbird, which is around the corner, offers its own tagging feature to manage bookmarks even more efficiently. Of course, you are not limited to using Thunderbird, either. Gmail also provides tools you can use to filter and group the bookmarked pages; plus, it doesn't tie you to a desktop application.

[1] Jarnal: http://www.dklevine.com/general/software/tc1000/jarnal.htm

Dmitri Popov holds a degree in Russian language and computer linguistics. He has been working as a technical translator and freelancer contributor for several years. He has published over 500 articles covering productivity software, mobile computing, web applications, and other computer-related topics. His articles have appeared in Danish, British, US, and Russian magazines and websites.