PyBookmark

PyBookmark provides a command-line utility that manipulates bookmark files. Presently it can sync files (no server required), merge, sort, remove duplicates, and check links. Its Python library pybookmarklib provides access to these operations, data structures, and parser for further extensibility.

PyBookmark requires Python 2.3 or later.

The latest version is PyBookmark-0.1.1 and it is licensed under the GNU General Public License (GPL).

Warning: PyBookmark is alpha software. USE WITH EXTREME CAUTION. If it deletes all of your files and reformats your hard-drive, thank me for testing your backup procedures.

PyBookmark has only been tested in conjunction with Firefox 1.5 on Mac, Linux, and Windows (through cygwin). It should work on other platforms. It should also work with other browsers that use the same bookmarks format; namely, the Mozilla suite and Microsoft IE, but these haven't been tested by me.

If you have problems or suggestions, please use the forums at the PyBookmark SourceForge site.

Features

PyBookmark is broken into two main components: A script pybookmark and a library pybookarklib. The script has the following options:

  1. Synchronize two bookmark files. Synchronization treats each file as a peer, looks for differences, and prompts the user whether the differences should be added to the final output. One of the files may be a remote file (by default, scp(1) is used to transfer the file).
  2. Sort a bookmark file. Sorts bookmark entries, in each folder recursively. The sort respects separator lines, so one can use separator lines to control the final result.
  3. Check for valid links. Attempts to open each link in the bookmark file. If the open fails, the user is prompted whether the bookmark should be removed.
  4. Remove duplicates. Removes duplicate bookmarks in each block (a block is delineated by separator lines).

pybookmarklib provides a Python library interface for the operations above, along with bookmark file data structures and parsers.

If you know of a free tool that does the job of PyBookmark, please let me know. I wrote this out of frustration with the existing tools and I'd be happy to replace it with something better.

News