I’ve been using Safari on my Mac since Tiger came out, but with Firefox 1.5 being released, I’ve decided to give it another try (I use Firefox on Linux, but I haven’t been very happy with it on the Mac before). It properly imported my Safari bookmarks, settings and even the cookies! Quite impressive. the only missing thing were my Sogudi bookmarks, the equivalent of Firefox’s keyword searches. So I wrote the following short Perl script to do the conversion:
#!/usr/bin/perl -w while (<>) { if (/\<key\>(.+)\<\/key/) { $key=$1; $str=<>; if ($str =~ /\<string\>(.+)\<\/string/) { ($url=$1)=~s/\@\@\@/\%s/g; $time=time(); print qq(<DT><A HREF="$url" ADD_DATE="$time" SHORTCUTURL="$key">$key</A>\n); } } }
Run it like this:
perl sogudi2firefox.pl SogudiShortcuts.plist
And insert the output in an appropriate place in your ~/Library/Application Support/Firefox/Profiles/xxxxxx/bookmarks.html
file.
1 response so far ↓
1 Adventures of an Argentinian » Blog Archive » Finally, Firefox = Safari + more // Feb 8, 2006 at 11:07 pm
[...] Another pretty major thing that needed tweaking was getting Sogudi functionality into my location bar. I’ve become very accustomed to just typing “wiki whatever” to find wikipedia pages of whatever, “php function_name” to find the php specs for a given function, etc, etc. Turns out FireFox has this built in, but its called Quick Search. The only thing left was to find this perl script to convert my Sogudi shortcuts to FireFox. [...]