NAME
URI::Collection - Input and output link collections in different formats.
SYNOPSIS
use URI::Collection;
$collection = URI::Collection->new (
file => $bookmarks,
directory => $favorites,
);
$bookmarks = $collection->as_bookmark_file (
save_as => $file_name,
);
$favorites = $collection->as_favorite_directory (
save_as => $directory_name,
);
DESCRIPTION
An object of class URI::Collection represents a parsed Netscape style bookmark file or a Windows "Favorites" directory with multi-format output methods.
METHODS
new
$collection = URI::Collection->new (
file => $bookmarks,
directory => $favorites,
);
Return a new URI::Collection object.
This method mashes link store formats together, simultaneously.
as_bookmark_file
$bookmarks = $collection->as_bookmark_file (
save_as => $file_name,
);
Output a Netscape style bookmark file as a string with the file contents.
Save the bookmarks as a file to disk, if asked to.
as_favorite_directory
$favorites = $collection->as_favorite_directory (
save_as => $directory_name,
);
Write an M$ Windows "Favorites" folder to disk and output the top level directory name.
A specific directory name can be provided for the location of the Favorites tree to write. If one is not provided, a folder named "Favorites-" with the system time stamp appened is written to the current directory.
DEPENDENCIES
TO DO
Make proper tests, damnit!
Throw out redundant links.
Optionally return the M$ Favorites directory structure (as a variable) instead of writing it to disk.
Allow input/output of file and directory handles.
Allow slicing of the category-links structure.
Add a method to munge a set of links as bookmarks or favorites after the constructor is called.
Allow this link munging to happen under a given category.
Check if links are active.
Update link titles and URLs if changed or moved.
Mirror links?
Make the internal global variables object attributes.
Handle other bookmark formats (including some type of generic XML), and "raw" (CSV) lists of links, to justify such a generic package name. This includes different platform flavors of every browser.
Move the Favorites input/output functionality to a seperate module like "URI::Favorites::IE::Windows" and "URI::Favorites::IE::Mac", or some such. Do the same with the above mentioned "platform flavors", such as Opera and Mosaic "Hotlists", and OmniWeb bookmarks, etc.
THANK YOU
A special thank you goes to my friends on rhizo #perl for answering my random questions. : )
SIMILAR STUFF
So there are an enormous number of web-based bookmark managers out there (see http://useful.webwizards.net/wbbm.htm), which I don't care about at all. What I do care about are multi-format link converters. Here are a few that I found:
Online manager:
http://www.linkagogo.com/
CDML Universal Bookmark Manager (for M$ Windows only):
http://www.cdml.com/products/ubm.asp
OperaHotlist2HTML:
http://nelson.oit.unc.edu/~alanh/operahotlist2html/
bk2site:
http://bk2site.sourceforge.net/
Windows favorites convertor:
http://www.moodfarm.demon.co.uk/download/fav2html.pl
bookmarker:
http://www.renaghan.com/pcr/bookmarker.html
Columbine Bookmark Merge:
http://home.earthlink.net/~garycramblitt/
XBEL Bookmarks Editor:
http://pyxml.sourceforge.net/topics/xbel/
And here are similar perl modules:
BabelObjects::Component::Directory::Bookmark
AUTHOR
Gene Boggs <gene@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2003 by Gene Boggs
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.