> if it is not very long, can you please post it here?

I have a quite similar script here:
http://martinus.geekisp.com/rublog.cgi/Projects/RubyToDot/rubytodot.html

martinus