Why not adopt me?
NAME
Netscape::Bookmarks::Category - manipulate, or create Netscape Bookmarks files
SYNOPSIS
use Netscape::Bookmarks;
#parse an existing file
my $bookmarks = new Netscape::Bookmarks $bookmarks_file;
#print a Netscape compatible file
print $bookmarks->as_string;
DESCRIPTION
The Netscape bookmarks file has several basic components:
title
folders (henceforth called categories)
links
aliases
separators
On disk, Netscape browsers store this information in HTML. In the browser, it is displayed under the "Bookmarks" menu. The data can be manipulated through the browser interface.
This module allows one to manipulate the bookmarks file programmatically. One can parse an existing bookmarks file, manipulate the information, and write it as a bookmarks file again. Furthermore, one can skip the parsing step to create a new bookmarks file and write it in the proper format to be used by a Netscape browser.
The Bookmarks.pm module simply parses the bookmarks file passed to it as the only argument to the constructor:
my $bookmarks = new Netscape::Bookmarks $bookmarks_file;
The returned object is a Netscape::Bookmarks::Category object, since the bookmark file is simply a collection of categories that contain any of the components listed above. The top level (i.e. root) category is treated specially and defines the title of the bookmarks file.
METHODS
$obj->add
$obj->append_title
$obj->append_description
$obj->add_desc
$obj->title
$obj->description
$obj->add_date
$obj->id
$obj->folded
$obj->elements
$obj->categories
$obj->links
$obj->as_string
AUTHOR
brian d foy <comdog@panix.com>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
HTML::Parser, Netscape::Bookmarks::Category, Netscape::Bookmarks::Link, Netscape::Bookmarks::Separator.