You export the bookmarks from Safari into Firefox. Your old IE bookmarks show-up with a .url extension in Firefox (other bookmarks that you added in Safari, i think work fine). So, you click on one of those favorites with a .url extension and Firefox goes nuts with it. On my MBP, firefox was going in an infinite loop when we select a .url bookmark in the favorites - it tries to open infinite windows. Searched quite a bit, but could not find something quick and easy to deal with this issue, so wrote the following to convert bookmarks, so they can be used directly with Firefox. You would get the bookmarks.html file that you will pass as an argument to this script by exporting bookmarks in Firefox. Redirect the script's output to an html file and import it back into Firefox. Enjoy, Vishnu Pendyala
#!/usr/bin/perl
#!/usr/bin/perl
# Script to convert a bookmarks.html file on Mac Book Pro
# with .url file locations imported from Windows IE8 to
# import as Firefox bookmarks.
open FH, "<ARGV[0]";
while (<>) {
if (/file:/) {
$filename = $_;
$filename =~ s#.*file://##g;
$filename =~ s#\.url".*#.url#g;
$filename =~ s#%20# #g;
chomp $filename;
open FH1, "$filename";
@urlFile = <FH1>;
close FH1;
@line = grep (/^URL=/,@urlFile);
$url = @line[0];
$url =~ s#^URL=##g;
chop $url;
s#"file:///.*.url" #"$url" #g;
s#.url</A#</A#g;
}
print $_;
}
No comments:
Post a Comment