Poor mans Safari bookmark conversion command line

Being without my Mac has been painful – I’m stuck on my PC, and I can’t just read Safari’s XML formatted bookmarks file.

So, I did a few lame tricks to get a list of urls:

%grep ‘http://’ Bookmarks.plist | sed -e :a -e ’s/<[^>]*>/ /g’ -e ’s/[\t]*//’ | uniq | \ awk ’{ print ”$1”>/A>
”}’ > bookmarks.html

This will leave you with a file of HREFS pointing to the URL in question, with the link text being the same as that of the URL itself; not very elegant, but it works. You get your URLs back, but you lose any formatting or subgroups. (sob)

If you see ‘Yen’ signs in the above, it’s because there’s something funky with your browser, the literal is a forward slash followed by an equal sign. I have no idea why some mozilla based clients do that when I have my encoding set for stock ISO-8859-1. You can view it as it SHOULD be here.

Here’s the first few URLs I obtained with this method, directly cuttenpasted from the output of the command line above (Note that I replaced the
with hard returns to get rid of wasted whitespace in my diary, but in a browser, it’d be painful to view the raw HTML):

http://MarginalHacks.com/
http://aap.sourceforge.net/faq.html
http://abc.net.au/mediawatch/classics.htm
http://alphaconspiracy.com/alpha.html
http://apple2.intergalactic.de/
http://archives.neohapsis.com/archives/sf/sun/2000-q2/att-0272/01-chrooting_bind.html
http://c64.org/radio/

Groovy, huh?

I’ve got quite a few of them sorted out, and imported into Phoenix. Here’s my Phoenix bookmarks file.