[P1] Safari Web Browser

Zachary Heaton zheaton at ameritech.net
Wed Jan 8 12:14:46 PST 2003


On Wednesday, Jan 8, 2003, at 09:55 Canada/Eastern, Jim Freeman wrote:

> Has anyone figured out how to import bookmarks from Omniweb?
>
> Jim

There is probably a faster way to do this, but here's how I pulled it 
off.  Safari's documentation states that it auto-imports bookmarks from 
IE on the first time that it boots up.  Fortunately, Omniweb bookmarks 
(~/Library/Application Support/Omniweb/Bookmarks.html) are in nearly 
the same file format as IE bookmarks.  Thus, the trick is to copy your 
Omniweb bookmarks file, rename the copy to "Favorites.html", and place 
it in "~/Library/Preferences/Explorer/" .  Now, go up a directory into 
your Preferences folder, and move the file "com.apple.Safari.plist" to 
your desktop.  This last step "fools" Safari into thinking that it has 
not been launched before.  (Of course, if you are feeling adventurous, 
you can always open up the preferences file and set the 
"IEFavoritesWereImported" tag to "No" or "<false/> - no guarantees, 
this isn't how I did it.)

Now, all that you need to do is launch Safari, and it will 
automatically import your "Internet Explorer" bookmarks, which are 
really your Omniweb bookmarks.  (It will also create a new 
"com.apple.Safari.plist" file and nuke all of your preferences - either 
replace the new .plist file with the old one you removed or put your 
preferences back the way you like them by hand.  You may also wish to 
put back your real IE "Favorites.html" file if you had to move it out 
of the way.)

There are two major caveats to this procedure, both of which are easily 
fixable.

1.  Omniweb supports giving addresses to bookmark folders.  Safari does 
not.  Thus, if you have bookmark folders with addresses defined in 
Omniweb, in Safari they will show up with a name like:

> <a href="http://www.google.com/" lastCheckedTime=62993007 
> wordCount=173>Google</a>

Fortunately, you can select that URL in the Safari folder name and drag 
and drop it within the Safari bookmark manager to create a new 
bookmark.  Or, you can clean up the bookmarks ahead of time in Omniweb. 
  It's a toss-up as to which will be easier.

2.  Even if you don't have an address assigned to a folder, you will 
still get folder names like this:

> <a lastCheckedTime=57712409>Search</a>

You can either do what I did, which is to grit your teeth and clean 
them up in Safari, or you can probably fix the text with a little 
search-and-replace in BBEdit before you open the file.  Which method 
you choose depends on how comfortable you are with using grep.  One 
helpful hint:  In the Omniweb bookmarks file, the folder names are 
enclosed by <h3> and </h3> tags.  If you try the BBEdit route, let us 
all know if you find a search pattern that does the trick without 
stripping the address from regular bookmarks.

-----------

The frustrating thing about this is that it would take so little to get 
the browser to import Omniweb bookmarks - just a change in which folder 
it looked in and a few routines to clean up some text.  But then again, 
this is a beta.  Hopefully, they will add this feature in the final 
version.

Regards,
Zach Heaton



More information about the iBook mailing list