Skip navigation and links


Configure this blog!

 
 

Archives

week of 06.01.2008
week of 23.09.2007
week of 06.05.2007
week of 24.12.2006
week of 06.08.2006

more archives...

Topics

Photographs
Large Format
Macintosh
Reviews

more topics...

Homeland Security Advisory System

ELEVATED

Significant Risk of
Terror Attacks

Blog di Rovinare di Sid

Objectivity Implemented in Thought, Action, Computers, and Photography

Archive mode
(Week of 10.04.2005)

[ back to current blog ]

Sunday, 10 April 2005

Converting Opera bookmarks to Firefox —

I have decided to give Firefox another try as my primary web browser on the Mac, but Firefox can't import Opera bookmarks. There are a couple of tools available to convert bookmarks between various browsers' formats, but they either suck or are not free or don't work (subcategories of suck). I thus had to write my own converter, so I wrote a short little Ruby script to convert my bookmarks from Opera's to Netscape's format. To use it, just export your bookmarks from Opera and do

$ ruby bmconv.rb opera6.adr > out.html

It's BSD licenced of course.

A couple of observations:

  1. It sure is nice to add methods to pre-existing classes (Object in this case), although I've done this before with categories in Objective-C.
  2. Ruby's open-ended slicing syntax is kind of lame. In Python, you just say foo[3:], but in Ruby, you say foo[3..-1] which doesn't do what you'd think just from looking at it since it turns out that ranges with .. are inclusive and ranges with ... are exclusive. (Python foo[1:-1] is Ruby foo[1...-1] or foo[1..-2].)

Update: This file has been moved. See the updated entry.

posted by Sid at 15.35 / 899     [ Comments: 0 ]

[ back to current blog ]


XHTML 1.1 Compliant   CSS Compliant   WCAG 1.0 AAA Compliant   Atom 1.0 Compliant

Copyright © 2002-2008 Sidney Cammeresi. All rights reserved.
The moral right of the author has been asserted.