This is a multi-part message in MIME format.

------extPart_000_0080_01C17FCF.5324C100
Content-Type: text/plain;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

very nice!!!

Mikkel
  ----- Original Message ----- 
  From: Ralph Mason 
  To: ruby-talk ML 
  Sent: Saturday, December 08, 2001 6:10 AM
  Subject: [ruby-talk:27897] Dictionary.com speeder upper


  Here is a little script I did to make dictionary.com more useful for me.
   
  I think others may find it useful. Note: the HTML formatting it uses sucks
   
  Ralph
   
   
  require "net/http"

  if  ARGV.size == 0 
   puts  "Usage: dictionary term"
   exit
  end

  a = Net::HTTP.get("www.dictionary.com","/cgi-bin/dict.pl?term=#{ARGV[0]}")

  if ( a=~/No entry found for/ ) 
   puts "No entry found for '#{ARGV[0]}' - Suggestions:\n\n"
   
   while $' =~/<a href="\/cgi-bin\/dict.pl\?term=\w+">(\w+)/
    puts $1
   end
  else
   while a =~ /<!-- resultItemStart -->/
    $' =~ /<!-- resultItemEnd -->/
    a=$'

    puts  $`.gsub(/<.*?>/m){ |i| 
     case i
      when "<b>"
       ""
      when "</b>"
       "\n"
      when "<p>"
       ""
      else
       ""
     end
     }
   end
  end


------extPart_000_0080_01C17FCF.5324C100
Content-Type: text/html;
	charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3315.2870" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>very nice!!!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Mikkel</FONT></DIV>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A href="mailto:ralph.mason / telogis.com" title=ralph.mason / telogis.com>Ralph 
  Mason</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  href="mailto:ruby-talk / ruby-lang.org" title=ruby-talk / ruby-lang.org>ruby-talk 
  ML</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, December 08, 2001 6:10 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> [ruby-talk:27897] Dictionary.com 
  speeder upper</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>Here is a little script I did to make ictionary.com more useful for me.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>I think others may find it useful. Note: the HTML 
  formatting it uses sucks</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Ralph</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>require "net/http"</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>if&nbsp; ARGV.size == 0 <BR>&nbsp;puts&nbsp; 
  "Usage: dictionary term"<BR>&nbsp;exit<BR>end</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>a = Net::HTTP.get("<A 
  href='http://www.dictionary.com","/cgi-bin/dict.pl?term=#{ARGV[0'>www.dictionary.com","/cgi-bin/dict.pl?term=#{ARGV[0</A>]}")</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>if ( a=~/No entry found for/ ) <BR>&nbsp;puts "No 
  entry found for '#{ARGV[0]}' - Suggestions:\n\n"<BR>&nbsp;<BR>&nbsp;while $' 
  =~/&lt;a href="\/cgi-bin\/dict.pl\?term=\w+"&gt;(\w+)/<BR>&nbsp;&nbsp;puts 
  $1<BR>&nbsp;end<BR>else<BR>&nbsp;while a =~ /&lt;!-- resultItemStart -&gt;/<BR>&nbsp;&nbsp;$' =~ /&lt;!-- resultItemEnd 
  --&gt;/<BR>&nbsp;&nbsp;a=$'</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp;puts&nbsp; $`.gsub(/&lt;.*?&gt;/m){ 
  |i| <BR>&nbsp;&nbsp;&nbsp;case i<BR>&nbsp;&nbsp;&nbsp;&nbsp;when 
  "&lt;b&gt;"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;""<BR>&nbsp;&nbsp;&nbsp;&nbsp;when 
  "&lt;/b&gt;"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"\n"<BR>&nbsp;&nbsp;&nbsp;&nbsp;when 
  "&lt;p&gt;"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;""<BR>&nbsp;&nbsp;&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;""<BR>&nbsp;&nbsp;&nbsp;end<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;end<BR>end<BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>

------extPart_000_0080_01C17FCF.5324C100--