home *** CD-ROM | disk | FTP | other *** search
- #!/usr/local/bin/perl
- #
- # convert.pl v1.1
- # Copyright C - 1995 Jon Wichmann Hansen
- # http://www.cbs.dk/people/eclipse/
- # wichmann@proventum.dk
- #
- # Converts a netscape v1.2N bookmark.html file to a file that can be
- # read by the rand_link.pl - random link generator by
- # Matt Wright. (Thanks to him for that one)
- #
- # Version 1.1 Enhancements by Matt Wright.
- # This script works on version 1.2 - 2.0b1 Netscape versions on either Unix or
- # Mac. I have neot tested it on the Macintosh, so please inform if it works
- # with a Macintosh bookmark file. Thanks. - mattw@alpha.pr1.k12.co.us
-
- $bookmarks = "./BOOKMARK.HTM";
- $rand_file = "./links.txt";
-
- open (OUTFILE, ">./$rand_file"); #This is the input-file for rand_link.pl
- open (INFILE, "./$bookmarks"); #Change this to be your bookmark-file
- while (<INFILE>)
- {
- if (/http:/)
- {
- ($adresse, $skodlort)=split(/" ADD_DATE/, $_);
- ($skodlort, $final)=split(/A HREF="/, $adresse);
- print OUTFILE $final,"\n";
- }
- }
-
- close (FILE);
-
- close (OUTFILE);
-