
                             PALM BOOKMARKS

                            J.I. van Hemert

                               2001-03-27

1. Introduction

This cgi script parses the bookmarks file of Netscape and produces
(internally) a csv (comma separated) file. This is then converted to a Palm
database (pdb) suitable for the ListDB program.


2. Details

Palm-Bookmarks transforms a bookmarks tree into a list of records where each
record looks like this: category, name, location, description. The name,
location and description are directly copied from Netscape terminology. Each
record corresponds to one bookmark. The category is determined by the first
list of folders (the ones you see when you click down the bookmarks menu). A
record gets as a category the name of the folder from this list it is placed in.
This way information is lost as subfolders are ignored. The reason for this is
that the program ListDB on the palm support only one level of categorisation.


3. Example

The bookmarks below in Figure 1. are transformed into the list of records in
Figure 2. Note the subtree 'News' that is categorised under 'Games'. Also a
new category '_top' is created to categorise the bookmarks that have no
folder.


Bookmarks
  |
  +-- My homepage - http;//www.liacs.nl/~jvhemert
  |
  +-- Linux
  |     |
  |     +-- Slashdot - http://slashdot.org
  |     |
  |     +-- Freshmeat - http://freshmeat.net
  |     |
  |     +-- The Linux Kernel Archives - http://www.kernel.org
  |
  +-- Games
  |     |
  |     +-- Quake - http://www.quake.org/
  |     |
  |     +-- News
  |     |     |
  |     |     +-- Bluesnews - http://www.bluesnews.com/
  |     |     |
  |     |     +-- Linux Game Tome - http://www.happypenguin.org/
  |     |
  |     +-- Mame - http://www.mame.net/ - Multiple Arcade Machine Emulator
  |
  +-- Search
        |
        +-- Google - http://www.google.com
        |
        +-- FileWatcher - http://filewatcher.org/

            Figure 1. A 'typical' bookmarks tree

  
        _top,My homepage,http;//www.liacs.nl/~jvhemert
        Linux,Slashdot,http://slashdot.org
        Linux,Freshmeat,http://freshmeat.net
        Linux,The Linux Kernel Archives,http://www.kernel.org
        Games,Quake,http://www.quake.org/
        Games,Bluesnews,http://www.bluesnews.com/
        Games,Linux Game Tome,http://www.happypenguin.org/
        Games,Mame,http://www.mame.net/,Multiple Arcade Machine Emulator
        Search,Google,http://www.google.com
        Search,FileWatcher,http://filewatcher.org/
    
            Figure 2. A csv conversion of Figure 1.


4. Installation

To install copy the palm-bookmarks.cgi and index.html to a directory where
you can reach both through a webserver (like) apache that is able to run cgi
scripts. Try this script on its own homepage.

The easiest way to use and test this script is by giving it a bookmarks file
as commanline argument, it will print a PDB file to stdout. Example:

    palm-bookmarks.cgi bookmarks.html > bookmarks.pdb

 

5. Author and license

This program is copyrighted by J.I. van Hemert <jvhemert@cs.leidenuniv.nl> and
licensed under the GNU Public License, a copy of which should be in the
package this program was transported in. It uses a program called csb2lsdb.pl
of Darren Dunham <add@netcom.com> that transforms csv files into pdb
databases suitable for ListDB.
