Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

(atl: look on CPAN) Re: Sorting Netscape Browser Bookmarks

by atl (Pilgrim)
on Jul 19, 2001 at 16:53 UTC ( [id://98054]=note: print w/replies, xml ) Need Help??


in reply to Sorting Netscape Browser Bookmarks

Yes, there is. You might try a search on CPAN, start with an obvious search pattern like "Netscape". That would yield:

http://search.cpan.org/search?mode=module&query=Netscape

Netscape-Bookmarks-1.3 is what you're looking for, I believe.

-atl

Replies are listed 'Best First'.
Re: (atl: look on CPAN) Re: Sorting Netscape Browser Bookmarks
by foogod (Friar) on Jul 19, 2001 at 18:03 UTC

    Atl gives good advice, but I would actually go with URI-Bookmarks it is sorta the sequel to Netscape::Bookmarks.

    For starting code I would do something like this (as taken from the POD)...

    #!/usr/bin/perl use strict; use URI::Bookmarks; my $bookmarks = new URI::Bookmarks(file => "$ENVHOME}/.netscape/bookmarks.html"); my $bookmarks = new URI::Bookmarks(handle => $fh); my $bookmarks = new URI::Bookmarks(array => \@lines); # Manipulate $bookmarks using nice tree methods from Tree::DAG_Node, # e.g. delete all bookmarks under $folder: ($bookmarks->name_to_nodes($folder))[0]->unlink_from_mother(); # Then output the new file. print $bookmarks->export('Netscape array');


    HTH

    -foogod


    --- ruining the bell curve for everyone else ---
      Hi foogod,

      I didn't take the time to look into the modules, since the module names pretty much suggested that they were what this guy wants.

      However, Netscape::Bookmarks seemed fairly recent (last updated last may) which URI::Bookmarks seems less active (last updated november 1999). You're sure about that being a sequel?

      Have fun ...

      -atl

        atl,

        your right. I used "sequel" poorly, rather it is a different take on the same problem. The last mod date for URI::Bookmark (version date) is 1/16/2001 better bookmark for URI::Bookmarks.

        Also I recently did a project at work and I used this PM, because it can handle bookmarks other than netscape. MTOWTDI ... thx for the good catch.

        - foogod

        --- ruining the bell curve for everyone else ---

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://98054]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-03-29 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found