Hallo, Am Sat, 25 Oct 2003, Maximilian A. Lange schrieb:
wie kann ich meine Bookmarks aus dem Microsoft InternetExplorer6.0 in suse-linux-9.0 einfügen? bei windows sind diese links ja in C:\Windows \Favorieten gespeichert...
==== ~/bin/fav2html.pl ==== #! /usr/bin/perl use warnings; use strict; use File::Find; use File::Basename; use Carp; my $debug = 0; my $indent = " "; my ($oldlevel, $level) = (0,0); my ($oldsubdir, $subdir) = ("IE-URLS", ""); $| = 1; my $FAVDIR = $ARGV[0] || "/windows/C/windows/Favoriten"; $FAVDIR =~ s/\/$//; sub print_header { print q[ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//DE"> <html> <head> <title>IE Urls</title> </head> <body><p> ]; } sub print_footer { print "\n</body>\n</html>\n"; } sub wanted { my $file = $File::Find::name; chomp($file); if ( -f $file ) { print STDERR "file='$file'\n" if $debug; $subdir = dirname($file); $subdir =~ s/$FAVDIR\/?/\//; my $title = basename($file); chomp $title; $title =~ s/\.url//; $subdir =~ s/^\/$/IE-URLS/; $level = ( $subdir =~ tr/\/// ) + 1; if ($level > $oldlevel) { print $indent x $oldlevel, "<DT><h3>", basename($subdir), "</h3>\n", $indent x $oldlevel, "<DL><p>\n"; $oldlevel = $level; $oldsubdir = $subdir; } elsif ($level < $oldlevel) { print $indent x $level, "</DL><p>\n"; $oldlevel = $level; $oldsubdir = $subdir; } elsif ( $subdir ne $oldsubdir ) { print $indent x $level, "</DL><p>\n", $indent x $oldlevel, "<DT><h3>", basename($subdir), "</h3>\n", $indent x $oldlevel, "<DL><p>\n"; $oldsubdir = $subdir; } open (URL, "<$file"); my $shortcut = 0; my $url = ""; while(<URL>) { if($shortcut && /^URL=(.*)$/ ) { $url = $1; chomp ($url); $url =~ s/\r$//; $shortcut = 0; } if(/\[InternetShortcut\]/) { $shortcut = 1; } } close(URL); print $indent x $level, '<DT><a href="', $url, '">', $title, "</a></DT>\n"; } } # main unless(-d $FAVDIR) { die "ERROR: $FAVDIR is not a directory: $!\n"; } &print_header; finddepth(\&wanted, $FAVDIR); while(--$level >= 0) { print $indent x $level, "</DL><p>\n"; } &print_footer; 1; ==== -- Ich dagge° also bin Ich! [WoKo in dag°]