Netscape::Bookmarks::Category - manipulate, or create Netscape Bookmarks files |
Netscape::Bookmarks::Category - manipulate, or create Netscape Bookmarks files
use Netscape::Bookmarks;
#parse an existing file my $bookmarks = new Netscape::Bookmarks $bookmarks_file;
#print a Netscape compatible file print $bookmarks->as_string;
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.
folded collapsed state of the category ( 1 or 0 ) title add_date description
add()
function adds an element to a category. The element must be a Alias,
Link, Category, or Separator object. Returns TRUE or FALSE.
title()
id()
add_date()
elements()
categories()
links()
as_headline()
as_string()
This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.
http://sourceforge.net/projects/nsbookmarks/
If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.
brian d foy, <bdfoy@cpan.org>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
If you send me modifications or new features, I will do my best to incorporate them into future versions. You can interact with the Sourceforge porject for this module at http://sourceforge.net/projects/nsbookmarks/.
the Netscape::Bookmarks manpage
Netscape::Bookmarks::Category - manipulate, or create Netscape Bookmarks files |