Version: 1.5.0

b. is a Web-based manager for Web bookmarks. Bookmarks are stored in an XML file. Operations on the data are done with Perl scripts.


Collaborative bookmarks

A new and powerful feature is the ability to share bookmarks. These shared bookmarks may be publicly viewed by all, while a certain set of users have the ability to add or change them. These users can also add comments to the shared bookmarks, as in a bulletin-board. The display of the shared bookmarks is highly configurable: one can show extra information associated with a bookmark, such as its popularity, when it was last visited, when it was added, etc. With these new features, b. becomes a collaborative space for sharing discoveries of the Web.

Old-style b. functionality is not lost however: one can still maintain a set of private bookmarks just as before. What's new is the option to exchange bookmarks between the private and shared sets.

Accessible from any Web browser

The main advantage for storing your bookmarks on the Web is to have them accessible from any Web browser. b. produces XHTML 1.0 code, doesn't use any Javascript, and is best viewed with a CSS1-compliant browser such as Netscape 6+/Mozilla, Internet Explorer 5+, and Opera 5+.

Bookmark data stored in XML format

XML has quickly become an acknowledged standard for the management of data transmitted over the Internet. Its foundation as a markup language like HTML gives it a wide base of users, and its precept of separating data from its display provides XML versatility for the many possible uses of the data.

I'm using a DTD for collaborative bookmarks called XBEL-collab. It's a slight modification of the XBEL DTD for bookmarks >>, to allow for features like comments and hit counts. The original XBEL DTD was created by python.org.


In a themes/ subdirectory, one can determine the look of b. with CSS stylesheets, custom graphics, and HTML templates. There are more customization options with this new release.


b. supports multi-user environments. Using basic Web server user authentication (i.e. by password-protecting the b./ directory), only certain users can have access to b.. Each user has his/her own bookmarks and optionally can have his/her own theme, welcome message, etc.


Must close browser to log off

This is a limitation of basic HTTP user authentication: once you have access to a directory, you always have access until your browser session has ended.

Modify bookmarks from one machine at a time

Problems can result if one attempts to modify bookmarks from two different machines at the same time. (Viewing and accessing the data from more than one machine is fine.) Although a backup of the XML file is written every time it is modified, something more secure could be implemented.


View an example of shared bookmarks >>. This would be the publicly accessible view open to all.

Also view a version of the same bookmarks from a contributer's perspective >>. This is the same set of bookmarks, but with additional buttons for adding / editing the bookmarks (crippled for this demo). For fun, I've specified a different theme for this view. It is recommended that these pages be viewed with a CSS1-compliant browser like Netscape 6+ / Mozilla, Internet Explorer 5+, or Opera 5+.

Finally, here is a view of an example set of personal bookmarks >>.

Installation Requirements

Must be able to run Perl scripts on your Web server. For multi-user environments, must be able to password-protect the b./ directory.


Latest development release, v1.5.0

\/ b.-1.5.0.tar.gz (104 KB)
\/ b.-1.5.0.zip (130 KB)

Stable release, v1.3.3

\/ b.-1.3.3.tar.gz (81 KB)
\/ b.-1.3.3.zip (127 KB)

Previous releases

\/ b.-1.4.4.tar.gz (81 KB)
\/ b.-1.4.4.zip (129 KB)

Installation Instructions

View the readme.html file: devel ver 1.5.0 >> | stable ver 1.3.3 >>.

User Contributions

Note that some of these contributions may not work with the latest release. I've added version numbers to the contributed files to denote this.

Integration into your browser (DB ver)

Deb Bassett <mailto:db@urbanwide.com> suggested code additions and the following bookmarking JavaScript: "It's quite simple, it's a bookmark that can be added to an IE / Mozilla toolbar that contains a bit of javascript. When clicked, it automatically pops up a new window with a b.link add link page with href and title fields filled in by taking the url and title from the current page. I've hacked a couple of lines into your script to read the parameters in and output them to href and title form fields , but I know it can be done better. :)"

Here is her bookmark (with some minor tweaks by me):
\/ b.Link It!.url (0.3 KB)
. You'll want to edit it to get it to link to your own web site.

Integration into your browser (SS ver)

Sean Stuckless <mailto:sstuckless@rogers.com> gives this useful tidbit: "I have created a JavaScript bookmarker that works in conjunction with b.. Using this bookmarker with b. makes bookmarking sites a snap. It works with Netscape 4.7, 6, and IE 5.x.

"If you place the following href in your browser's quick link area, then whenever you find a site that you want to bookmark, then click the link, and it will add the site to your bookmarks.

"Replace YOUR_SITE_HERE with your bookmarker web server host.domain.com."

Addendum (East Asian version)

Ronald Tin adds the following tip for East Asian languages: "I find that the Integration into your browser javascript does not support inserting bookmarks in East Asian language in Mozilla 1.1a.

"I just managed to fix the problem by changing the 2 escape functions to encodeURIComponent in the javascript and changing the 2 Content-type lines from

Content-type: text/html


Content-type: text/html; charset=utf-8

in cgi.pl."

Compatibility with Netscape 4.7

Additionally, Sean Stuckless <mailto:sstuckless@rogers.com> has created a theme that works with Netscape 4.7. To use, just pop the clean/ folder into your themes/ folder, and change the $theme variable to "clean" in the file b.header.pl.

\/ b.-1.0_clean-theme.tar.gz (1 KB)
\/ b.-1.0_clean-theme.zip (2 KB)

Bookmark searching and random links

Steve Kemp <http://www.steve.org.uk/> has created a couple of scripts which add some neat features to b.: b.search.pl adds search capabilities and b.random.pl selects a random link from a user's bookmarks. Examples of use are at <http://www.mybookmarks.org.uk/>. The following downloads include instructions for installing and using his scripts.

\/ b.-1.0_sk-updates.tar.gz (13 KB)
\/ b.-1.0_sk-updates.zip (14 KB)

Converting Internet Explorer bookmarks

Another script by Steve Kemp <http://www.steve.org.uk/>: "It will read in your favorites, from IE, and dump out a b.xml file to STDOUT:

 C:\> perl fav2b.pl > b.xml

 "I use it to generate a b.xml file from my favourites, after reorganizing them."

\/ b.-1.0_fav2b-script.tar.gz (2 KB)
\/ b.-1.0_fav2b-script.zip (2 KB)

Converting bookmarks to / from various browser formats

Bill Stilwell writes: "You're probably already aware of this, but there's a collection of Python utilities for processing to and from XBEL in the PyXML project:


"I used the ns_parse script to convert my Mozilla bookmarks to XBEL and it's working like a charm with b."

Note: these scripts are in the demo/xbel directory of that distribution.

Converting bookmarks from Mozilla / Netscape format to XBEL format

Jonathan Mayer adds: "I had difficulty getting the PyXML scripts to work, so I just wrote a quick Mozilla / Netscape bookmarks.html -> b.xml converter in Perl. It uses two Perl modules easily obtainable off CPAN >>:


The script is available here:



Improvements to moz2xbel

drew robinson made some improvements to Jonathan Mayer's script: "so i tried using the moz2xbel script. this one worked very well, and after looking more closely, i made a couple of improvements to it:

"i'm attaching it for you to look at, and hopefully post on your site, as i think it's the best method of conversion, although you do need the 2 perl modules Netscape::Bookmarks and XML::Generator."

Download drew robinson's script here (right- or ctrl- click to download):

\/ moz2xbel (2 KB)

Converting bookmarks from Omniweb to XBEL format

Juergen with-no-last-name submits: "Omniweb is one of the prime browsers on MacOS X. None of the other converters got the Bookmarks.html right, so I wrote my own perl script. In addition it tires to grab a description for every link from the refered page.

omniweb2xbel can be found here:



Converting Safari bookmarks to XBEL

Juergen Sell returns with another converter script: "Safari is the browser of choice, coming bundled with MacOS X. None of the other converters got the Bookmarks.plist right for me, so I wrote my own perl script. In truth I just cannibalized omniweb2xbel for that. In addition it tries to grab a description for every link from the refered page. As a minor tradeoff it does reverse the order of bookmarks and folders.

safari2xbel can be found here:




1.5.0 2005/10/18
Added interoperability with Firefox Bookmarks Synchronizer >>. This includes workarounds for bookmark id's containing '#' signs and '%3A' entities. Thanks to f_x for bringing this to my attention.
Fix for splicing new items into xbel files using different whitespace.
1.4.4 2005/05/22
Added a confirmation popup when deleting items. Thanks to Flying Albert for this contribution. You may turn this off in b.conf.
1.4.3 2004/04/08
Thanks to Ronald Tin for his patch yielding the following improvements: more CGI fields HTML-encoded to interface better with scriplets; general HTML-encoding improvements; added 2-digit time format. Additional changes include: new configuration parameter 'link_target' allows one to target links to another window or frame (suggested by Robert Schmid); removed option of exporting shared bookmarks if not necessary (suggested by Martin Olsson).
1.4.2 2003/09/20
Code contribution from Deb Bassett: addition to b.mod.cgi to auto-fill href and title. Useful in conjunction with her bookmarking JavaScript (see User Contributions > Integration into your browser on the main b. page >>) for more on this.
1.4.1 2003/08/24
Minor addition suggested by John Mellor: add 'mailto:' to beginning of URI if an '@' sign is detected. (This feature may be turned off in the b.conf files.)
1.4.0 2003/08/10
Separated CGI scripts from themes. Renamed all executable scripts to have .cgi extension. Allow default view mode for personal bookmarks. Version 1.3.3 upgraded to stable.
1.3.3 2002/03/17
Fixed more bugs from 1.3.1. Thanks to Alan Schussman and Tomki for identifying them.
1.3.2 2002/03/14
Nasty bug introduced in 1.3.1: modifying a folder/bookmark's description would also modify the descriptions for all subsequent items! This has been fixed.
1.3.1 2002/03/11
Version 1.3.0 broke the display for Internet Explorer on the Mac. This has been fixed. (Sorry Mac users.) Fixed a bug where a populated folder could not be moved under another folder. A new bookmark without a title is given a default name of "Untitled". If a URI is submitted without a protocol type (eg http://), then a default protocol of http:// is prepended automatically. Finally, added a 'Tips and techniques' section /\ to the README. Thanks for Tomki for pointing out some of these bugs.
1.3.0 2002/02/01
Several new features this time. A search utility allows you to quickly access your bookmarks and folders. New viewing options enable you to display your bookmarks in two additional viewing modes: 'all' to view all bookmarks on one page, and 'sngl' to view one open folder at a time. Buttons have also been added so that you can shift items up and down within a folder. A nice convenience is the ability to 'wrap' movements around the ends of a folder, so that shifting down the last item will move it to the beginning of the folder. Finally, you can now export your bookmarks into raw XML or simple HTML to easily archive them. Other changes with this version are a few bug fixes, and theme changes to accomodate the new features. Also removed theme semaphore-ssi as its presence was purely pedagogical and furthermore unnecessary since HTML templates are supported. Credit goes to E. Lev for some of the ideas for this release.
1.2.0 2001/11/18
New feature is add-on scripts. Using add-on scripts, one can insert custom info for a bookmark / folder, such as a thumbnail image or a link to Google's "Find similar" feature. In fact, these examples are already implemented in the default add-on script which comes with the distribution. The b.css style sheets have new rules to cope with the new add-ons. Finally, added ability to open / close folders by clicking on the folder name. Thanks to Will Norris for these ideas and some code.
1.1.4 2001/11/12
I stupidly trusted a search-and-replace utility, which left some text garbage in two files b.link.pl and b.usrnfo2.pl. These have been cleaned.
1.1.3 2001/11/11
Corrected for include files not being found on Microsoft IIS servers (code contributed by Andy Low). Adjustments to semaphore theme due to weird IE6 CSS handling.
1.1.2 2001/10/19
Fixed b.shr/themes/blum/b.css again; there was a problem with this style sheet in Mozilla / Netscape 6. This is the only file changed from version 1.1.1. Incidentally, this fix also makes this theme correctly render for IE5 on Windows.
1.1.1 2001/10/18
Consistent EOLs for all files. This fixes CSS problem for Macs. Most other fixes are in the theme style sheets: theme semaphore now constrained to width 320px as in old 1.0 version; theme blum now has correct wrapping of bookmark and folder titles (unfortunately this means theme blum does not work for IE5 on Windows due to its faulty CSS compliance. Lastly, replaced 'target="_new"' with 'target="_blank"' in b.display.pl for correctly popping links into new windows.
1.1.0 2001/06/05
Major development release with many new features. The major new features are: support for collaborative bookmarks; greater control of bookmark display with HTML template files; timestamping of created/modified/accessed times for bookmarks; record of hits for shared bookmarks; each user has own informational page; new theme; et.al.
1.0 2001/05/15
Version 0.4.1 below upgraded to stable version 1.0. No different in other respects.
0.4.1 2000/12/19
Bug fix for Apache complaints of "Not enough arguments for mkdir...". Thanks to Sean McGrath for catching this. Sean also suggested a clarification for the installation instructions.
0.4.0 2000/11/15
Can support multiple users when used in conjunction with basic HTTP user authentication. This feature is optional and no script modification is necessary if you wish to stay single-user, or if you wish not to use password-protection.
Fixed bug which disallowed the deletion of bookmark/folder descriptions. Thanks to Mark Jordan for pointing this bug out.
Some minor code cleanup and fixes.
0.3.0 2000/09/15
Added the ability to open and close folders. By hiding rarely-used bookmarks, one can speed up the bookmark display.
Fully compliant with the XHTML 1.0 >> strict specification. XHTML is an XML-ization of HTML 4 for broader accessibility among various browsers, present and future.
Folders and bookmarks can now have the characters &, ", <, > in their titles/descriptions. Other special characters may be inserted by inserting the appropriate HTML codes (e.g. &copy; for ©).
0.2.1 2000/07/03
Fixed bug: When deleting an item, the parser code would incorrectly mark the end of the range to be deleted. The result would be the unintended deletion of extra items. This bug has been fixed.
0.2.0 2000/06/28
Initial release


The initial parsing of the XML data was aided by the regular expressions in REX >>, written by Robert D. Cameron. The XML spec for bookmarks, XBEL >>, was created by python.org.


You can e-mail me at <victor@n-gon.com> regarding comments, suggestions, bugs, and some assistance.