Netscape::Bookmarks::Link - manipulate, or create Netscape Bookmarks links
use Netscape::Bookmarks::Link; my $category = new Netscape::Bookmarks::Category { ... }; my $link = new Netscape::Bookmarks::Link { TITLE => 'this is the title', DESCRIPTION => 'this is the description', HREF => 'http://www.perl.org', ADD_DATE => 937862073, LAST_VISIT => 937862073, LAST_MODIFIED => 937862073, ALIAS_ID => 4, } $category->add($link); #print a Netscape compatible file print $link->as_string;
THIS IS AN ABANDONED MODULE. THERE IS NO SUPPORT. YOU CAN ADOPT IT IF YOU LIKE: https://pause.perl.org/pause/query?ACTION=pause_04about#takeover
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 links in for a Netscape bookmarks file. A link has these attributes, only some of which may be present:
title description HREF (i.e. URL) ADD_DATE LAST_MODIFIED LAST_VISIT ALIAS_OF ALIAS_ID
Additionally, Mozilla (the open source version of Navigator) uses these attributes:
SHORTCUTURL ICON SCHEDULE LAST_PING LAST_CHARSET PING_CONTENT_LEN PING_STATUS
Creates a new Link object. The hash reference argument can have the following keys to set the properties of the link:
HREF ADD_DATE LAST_MODIFIED LAST_VISIT ALIASID ALIASOF SHORTCUTURL ICON LAST_CHARSET
Returns the URL of the link. The URL appears in the HREF attribute of the anchor tag.
Returns the date when the link was added, in Unix epoch time.
Returns the date when the link was last modified, in Unix epoch time. Returns zero if no information is available.
Returns the date when the link was last vistied, in Unix epoch time. Returns zero if no information is available.
Sets the link title with the given argument, and returns the link title. If the argument is not defined (e.g. not specified), returns the current link title.
Sets the link description with the given argument, and returns the link description. If the argument is not defined (e.g. not specified), returns the current link description.
Returns the alias id of a link. Links with aliases are assigned an ALIAS_ID which associates them with the alias. The alias contains the same value in it's ALIAS_OF field. The Netscape::Bookmarks::Alias module handles aliases as references to Netscape::Bookmarks::Link objects.
Returns a Netscape compatible bookmarks file based on the Bookmarks object.
Performs any clean up necessary to remove this object from the Bookmarks tree. Although this method does not remove Alias objects which point to the Link, it probably should.
* Add methods for manipulating attributes
brian d foy <bdfoy@cpan.org>
<bdfoy@cpan.org>
Copyright © 2002-2019, brian d foy <bdfoy@cpan.org>. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.
Netscape::Bookmarks
To install Netscape::Bookmarks, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Netscape::Bookmarks
CPAN shell
perl -MCPAN -e shell install Netscape::Bookmarks
For more information on module installation, please visit the detailed CPAN module installation guide.