Bookmark Merger » download (31.5kb)

This is a tool for merging Safari bookmarks. Safari is a browser for OSX. It can import and export standard Netscape bookmark files. This means that this tool should also be able to merge bookmarks from other browsers that can use standard Netscape bookmark files.

The tool consists of two files, a perl script, which does the merging, and an applescript to make it convenient to use. To install it, download this zip file and after unzipping it, move the Merge script to your desktop (or somewhere else convenient) and put the script in your /Library/Safari folder.

To use the tool, simply drag a bookmarks file onto the Merge icon. This should create a new file on your desktop called merged bookmarks.html. This will initially contain only the contents of the first file your drag onto Merge. The next time you drag a bookmarks file onto Merge its contents will be merged into merged bookmarks.html. You can then import merged bookmarks.html back into Safari.

Note: To access the import/export bookmarks functions in Safari, you need to enable the Debug menu. To do this, quit Safari, open a terminal window and enter:

defaults write IncludeDebugMenu 1

When you restart Safari you should now have a debug menu containing (amongst other things), Import Bookmarks... and Export Bookmarks....

At the end of the day, I wrote this because I wanted to keep my bookmarks on my personal laptop up to date with my bookmarks on my work machine without the expense of a .mac account. Using this tool I can export my bookmarks from both browsers, merge the two together and reimport them.

The script can be configured for a few tweaks in its behaviour. By default, the script doesn't attempt to do anything clever with bookmarks which exist in several different folders. The resulting merged bookmarks.html will simply contain an amalgamation of the merged files.

To enable the script to try to do something slightly more sensible with bookmarks which exists in several folders, set removeDuplicates to 1 at the top of the script. This will cause the script to only keep the bookmark with the latest visit/creation/modification date. You may want to experiment with this. If you use this option, you can also get the script to remove any folders which end up empty. Set removeEmptyFolders to 1 if you want to enable this behaviour.

If you want to sort your bookmarks after merging, you might want to try Jerry Krinock's SafariSorter and for a tool to detect dead bookmarks, try Safari Prairiefire from Balooba Software.