<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Life's End</title>
    <link>http://lifesend.com/</link>
    <description>Worship</description>
    <language>en-us</language>
    <item>
      <title>Ruby snipits</title>
      <description>&lt;!-- 
Found 0 labeled equations 
eq ids: 
--&gt;
&lt;!-- 
Found 0 figures 
fig ids: 
--&gt;
&lt;style type="text/css"&gt;pre.code {   background-color: #DDD;   color: #112;   padding: 10px;   font-size: 90%;   overflow: auto;   margin: 4px 0px;   width: 95%;}pre .normal {}pre .comment { color: #005; font-style: italic; }pre .keyword { color: #A00; font-weight: bold; }pre .method { color: #077; }pre .class { color: #074; }pre .module { color: #050; }pre .punct { color: #447; font-weight: bold; }pre .symbol { color: #099; }pre .string { color: #944; }pre .char { color: #F07; }pre .ident { color: #004; }pre .constant { color: #07F; }pre .regex { color: #B66; }pre .number { color: #F99; }pre .attribute { color: #5bb; }pre .global { color: #7FB; }pre .expr { color: #227; }pre .escape { color: #277; }div .aao_footer{ font-size: 80%; }&lt;/style&gt;
   &lt;div id=header&gt;
   &lt;h2&gt;Ruby Snipits&lt;/h2&gt;
Aaron Radke &lt;br&gt;
2008-05-22 &lt;br&gt;
&lt;em&gt;A collection of ruby snippits that contain some chunk of code to get something working.&lt;/em&gt;&lt;p&gt;
&lt;/div&gt;
&lt;div id=toc&gt;&lt;h2&gt;Table of Contents&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#simple_definition_test"&gt;   Simple Definition Test&lt;/a&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;a href="#super_test"&gt;   Super Test&lt;/a&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;a href="#database"&gt;   Database&lt;/a&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#active_record"&gt;   Active Record&lt;/a&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;a href="#user_interaction"&gt;   User Interaction&lt;/a&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="#highline"&gt;   Highline&lt;/a&gt;
&lt;ol&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;/div
&lt;h2&gt;&lt;a id="simple_definition_test"&gt;&lt;/a&gt; Simple definition test 
&lt;/h2&gt;
&lt;pre class="prettyprint"&gt;
def test
   puts "this is a test"
end
&lt;/pre&gt;

&lt;h2&gt;&lt;a id="super_test"&gt;&lt;/a&gt; Super Test 
&lt;/h2&gt;
&lt;pre class="prettyprint"&gt;
class YammDB &lt; Hash
   def initialize(opts={})
      puts "making YammDB #{opts.inspect}"
      super
   end
end
class Sims &lt; YammDB
   def initialize(opts={})
      puts "making Sims with opts: #{opts.inspect}"
      super(opts)
   end
end
   
Sims.new(:blah)
Sims.new()
&lt;/pre&gt;

&lt;h2&gt;&lt;a id="database"&gt;&lt;/a&gt; Database 
&lt;/h2&gt;

&lt;h3&gt;&lt;a id="active_record"&gt;&lt;/a&gt; Active Record&lt;/h3&gt;
&lt;pre class="prettyprint"&gt;
#!/usr/bin/ruby
require 'rubygems'
require 'sqlite3'
require 'activerecord'
   
# connect to database.  This will create one if it doesn't exist
MY_DB_NAME = File.dirname(__FILE__) + "/my.db"
MY_DB = SQLite3::Database.new(MY_DB_NAME)
   
# get active record set up
ActiveRecord::Base.establish_connection(:adapter =&gt; 'sqlite3', :database =&gt; MY_DB_NAME)
ActiveRecord::Base.logger = Logger.new(File.open("db.log","a"))
ActiveRecord::Base.colorize_logging = false
#ActiveRecord::Base.logger = Logger.new(STDERR)
   
# create your AR class
class Routing &lt; ActiveRecord::Base
   has_and_belongs_to_many :destinations
   has_and_belongs_to_many :sources
end
class Source &lt; ActiveRecord::Base
   has_many :routings
   has_many :subsystems
end
class Destinations &lt; ActiveRecord::Base
   has_many :routings
   has_many :subsystems
end
class Subsystem &lt; ActiveRecord::Base
   has_many :destinations
   has_many :sources
end
   
class CreateTable01 &lt; ActiveRecord::Migration
   def self.up
      create_table :routings do |t|
         t.column :name, :string, :null =&gt; false
         t.column :description, :string
         t.column :xml_file, :string, :null =&gt; false
      end
      create_table :subsystems do |t|
         t.column :name, :integer
         t.column :version, :integer
      end
      create_table :sources do |t|
         t.column :subsystem_id, :integer
      end
      create_table :destinations do |t|
         t.column :subsystem_id, :integer
      end
      create_table :sources_routings, id =&gt; false do |t|
         t.column :routing_id, :integer
         t.column :subsystem_id, :integer
      end
      create_table :destinations_routings, id =&gt; false do |t|
         t.column :subsystem_id, :integer
      end
   end
      
   def self.down
      drop_table :routings
      drop_table :sources
      drop_table :destinations
      drop_table :sources_routings
      drop_table :destinations_routings
      drop_table :subsystems
   end
end
   
      
#CreateTable01.migrate(:down)
#CreateTable01.migrate(:up)
   
r = Routing.create(:name =&gt; 'test', :description =&gt; 'test routing', :xml_file =&gt; 'test.xml')
r = Routing.find_by_name('test')
   
puts r.name
   
&lt;/pre&gt;

&lt;h2&gt;&lt;a id="user_interaction"&gt;&lt;/a&gt; User interaction 
&lt;/h2&gt;

&lt;h3&gt;&lt;a id="highline"&gt;&lt;/a&gt; Highline&lt;/h3&gt;
&lt;pre class="prettyprint"&gt;
#!/usr/bin/ruby
require 'rubygems'
require 'highline'
   
      
@hl = HighLine.new
   
@hl.choose do |menu|
   menu.prompt = "Please choose your favorite programming language?  "
      
   menu.choice(:ruby) { @hl.say("Good choice!") }
   menu.choices(:python, :perl) { @hl.say("Not from around here, are you?") }
end
   
&lt;/pre&gt;
&lt;div class=aao_footer&gt;
&lt;hr&gt;

&lt;/div&gt;
</description>
      <author>Aaron Radke</author>
      <pubDate>Thu, 22 May 2008 12:18:18 +0000</pubDate>
      <link>&lt;a href="/feed/ruby"&gt;/ruby_snipits&lt;/a&gt;</link>
      <guid>&lt;a href="/feed/ruby"&gt;/ruby_snipits&lt;/a&gt;</guid>
    </item>
    <item>
      <title>rpass</title>
      <description>&lt;!-- 
Found 0 labeled equations 
eq ids: 
--&gt;
&lt;!-- 
Found 0 figures 
fig ids: 
--&gt;
&lt;style type="text/css"&gt;pre.code {   background-color: #DDD;   color: #112;   padding: 10px;   font-size: 90%;   overflow: auto;   margin: 4px 0px;   width: 95%;}pre .normal {}pre .comment { color: #005; font-style: italic; }pre .keyword { color: #A00; font-weight: bold; }pre .method { color: #077; }pre .class { color: #074; }pre .module { color: #050; }pre .punct { color: #447; font-weight: bold; }pre .symbol { color: #099; }pre .string { color: #944; }pre .char { color: #F07; }pre .ident { color: #004; }pre .constant { color: #07F; }pre .regex { color: #B66; }pre .number { color: #F99; }pre .attribute { color: #5bb; }pre .global { color: #7FB; }pre .expr { color: #227; }pre .escape { color: #277; }div .aao_footer{ font-size: 80%; }&lt;/style&gt;
   &lt;div id=header&gt;
   &lt;h2&gt;Rpass&lt;/h2&gt;
Aaron Radke &lt;br&gt;
2008-05-22 &lt;br&gt;
&lt;em&gt;An all ruby system to easily store and retrieve encrypted information.&lt;/em&gt;&lt;p&gt;
&lt;/div&gt;
Download: &lt;a href='/static/file/rpass.rb'&gt;rpass.rb&lt;/a&gt;&lt;pre class="prettyprint"&gt;
#!/usr/bin/ruby
#title:rpass
#date: 2008-05-19
#author:Aaron Radke
# TODO: add an optional encrypted file to use
require 'rubygems'
require 'crypt/rijndael'
require 'base64'
require 'stringio'
require 'crypt/blowfish'
#require 'highline/import'
require 'highline'
   
      
class RPass
   def initialize(opts={})
      @highline = HighLine.new
      @opts = opts
      @opts[:file] = File.dirname(__FILE__) + "/stored.aes" unless @opts.key?(:file)
      @key = @highline.ask("key for #{@opts[:file]}? ") { |q| q.echo = false}
      @rijndael = Crypt::Rijndael.new("%-32.32s" % @key)
      self.decrypt
   end
      
   def decrypt
      if File.exists?(@opts[:file])
         puts "Decrypting ..."
         #---decrypt
         encryptedString = ""
         File.open(@opts[:file], "r").each{|line|
            encryptedString &lt;&lt; line
         }
         # TODO?   Need to add the proper logic if the string did not decrypt
         f = File.open(@opts[:file], "r")
         begin
            @decryptedString = @rijndael.decrypt_string(encryptedString)
         rescue RuntimeError
            puts "Error: Could not decrypt: " + $!
            exit
         end
            
         if decryptedString.class != String
            puts "Error: could not decrypt unkown type"
            exit
         end
            
         #some other key will cause the header to be scrambled
         if decryptedString =~ /^title:rpass/
            @decryptedLines = decryptedString.split(/\n/)[1..-1]
         else
            puts "Error: could not decrypt"
            exit
         end
            
      else
         key2 = @highline.ask("new file: renter key ? ") { |q| q.echo = false}
         if key2 != @key
            puts "Error: Setting up new key failed"
            exit
         else
            @decryptedLines = []
         end
      end
   end
      
   def encrypt
      puts "Saving encrypted version..."
      plainString = @decryptedLines.join("\n")
      plainString = "title:rpass\n" + plainString
      f = File.open(@opts[:file],"w")
      print @rijndael.encrypt_stream(plainString)
      f.close
   end
      
   def insert(text, index = -1)
      @decryptedLines.insert(index, text)
   end
      
   def replace(text, index = -1)
      @decryptedLines[index] = text
   end
   def delete(index = -1)
      @decryptedLines.delete_at(index)
   end
      
   def grep(pattern)
      @decryptedLines.each_with_index{|line,i|
         if line =~ /#{pattern}/i
            puts "#{i}: #{line}"
         end
      }
   end
      
   def ask
      command = @highline.ask("rpass&gt; ", String)
         
      command.sub!(/^\s+/,'')
      command.sub!(/\s+$/,'')
         
      if command =~ /^h(elp)?$/
         puts "Available commands:"
         puts %{---------
            (h)elp
            (l)ist
            exit
            (s)ave
            reload
            (g)rep pattern
            (d)elete index
            (i)nsert index text
            (a)dd text
            newkey key
            (r)eplace index text
         }.gsub(/\t+/,'')
      elsif command =~ /^(exit|quit)$/
         encrypt
         return false
      elsif command =~ /^s(ave)?$/
         encrypt
      elsif command =~ /^reload$/
         decrypt
      elsif command =~ /^l(ist)?$/
         grep(".?")
      elsif command =~ /^g(rep)?\s+(.*)$/
         grep($2)
      elsif command =~ /^d(elete)?\s+(-?\d+)$/
         delete($2.to_i)
      elsif command =~ /^i(nsert)?\s+(-?\d+)\s+(.*)$/
         insert($3,$2.to_i)
      elsif command =~ /^a(dd)?\s+(.*)$/
         insert($2,-1)
         grep($2)
      elsif command =~ /^r(eplace)?\s+(-?\d+)\s+(.*)$/
         replace($3,$2.to_i)
      elsif command =~ /^newkey$/
         key1 = @highline.ask("Enter a new key? ") { |q| q.echo = false}
         key2 = @highline.ask("Renter new key? ") { |q| q.echo = false}
         if key1 == key2
            puts "Setting up new key..."
            @key = key1
            @rijndael = Crypt::Rijndael.new(@key)
         else
            puts "Error, key not duplicated.  New key not set."
         end
         replace($2,$1.to_i)
      else
         grep(command)
      end
         
      return true
   end
      
end
   
      
if ARGV.size == 1
   rpass = RPass.new(:file =&gt; ARGV[0])
else
   rpass = RPass.new
end
   
while rpass.ask
end
&lt;/pre&gt;
&lt;div class=aao_footer&gt;
&lt;hr&gt;

&lt;/div&gt;
</description>
      <author>Aaron Radke</author>
      <pubDate>Thu, 22 May 2008 12:17:59 +0000</pubDate>
      <link>&lt;a href="/feed/ruby"&gt;/rpass&lt;/a&gt;</link>
      <guid>&lt;a href="/feed/ruby"&gt;/rpass&lt;/a&gt;</guid>
    </item>
    <item>
      <title>rgrep</title>
      <description>&lt;!-- 
Found 0 labeled equations 
eq ids: 
--&gt;
&lt;!-- 
Found 0 figures 
fig ids: 
--&gt;
&lt;style type="text/css"&gt;pre.code {   background-color: #DDD;   color: #112;   padding: 10px;   font-size: 90%;   overflow: auto;   margin: 4px 0px;   width: 95%;}pre .normal {}pre .comment { color: #005; font-style: italic; }pre .keyword { color: #A00; font-weight: bold; }pre .method { color: #077; }pre .class { color: #074; }pre .module { color: #050; }pre .punct { color: #447; font-weight: bold; }pre .symbol { color: #099; }pre .string { color: #944; }pre .char { color: #F07; }pre .ident { color: #004; }pre .constant { color: #07F; }pre .regex { color: #B66; }pre .number { color: #F99; }pre .attribute { color: #5bb; }pre .global { color: #7FB; }pre .expr { color: #227; }pre .escape { color: #277; }div .aao_footer{ font-size: 80%; }&lt;/style&gt;
   &lt;div id=header&gt;
   &lt;h2&gt;Rgrep&lt;/h2&gt;
Aaron Radke &lt;br&gt;
2007-11-26 &lt;br&gt;
&lt;em&gt;A ruby script to give some grep like capabilities where grep is not available&lt;/em&gt;&lt;p&gt;
&lt;/div&gt;
Download: &lt;a href='/static/file/rgrep.rb'&gt;rgrep.rb&lt;/a&gt;&lt;pre class="prettyprint"&gt;
dirname = ARGV[0]
regexp_string = ARGV[1]
def search_file(file,regexp)
   f = File.open(file,'r')
   found = false
#	puts file
   f.each{|line|
      if line.match(regexp)
         if not found
            puts "\n#{file}"
         end
         puts "\t" + line
         found = true
      end
   }
   f.close
end
   
require 'find'
Find.find(dirname) do |file|
   print '.'
   search_file(file,/#{regexp_string}/) if File.file?(file)
end
   
      
&lt;/pre&gt;
&lt;div class=aao_footer&gt;
&lt;hr&gt;

&lt;/div&gt;
</description>
      <author>Aaron Radke</author>
      <pubDate>Mon, 26 Nov 2007 15:23:04 +0000</pubDate>
      <link>&lt;a href="/feed/ruby"&gt;/rgrep&lt;/a&gt;</link>
      <guid>&lt;a href="/feed/ruby"&gt;/rgrep&lt;/a&gt;</guid>
    </item>
    <item>
      <title>rhttpd</title>
      <description>&lt;!-- 
Found 0 labeled equations 
eq ids: 
--&gt;
&lt;!-- 
Found 0 figures 
fig ids: 
--&gt;
&lt;style type="text/css"&gt;pre.code {   background-color: #DDD;   color: #112;   padding: 10px;   font-size: 90%;   overflow: auto;   margin: 4px 0px;   width: 95%;}pre .normal {}pre .comment { color: #005; font-style: italic; }pre .keyword { color: #A00; font-weight: bold; }pre .method { color: #077; }pre .class { color: #074; }pre .module { color: #050; }pre .punct { color: #447; font-weight: bold; }pre .symbol { color: #099; }pre .string { color: #944; }pre .char { color: #F07; }pre .ident { color: #004; }pre .constant { color: #07F; }pre .regex { color: #B66; }pre .number { color: #F99; }pre .attribute { color: #5bb; }pre .global { color: #7FB; }pre .expr { color: #227; }pre .escape { color: #277; }div .aao_footer{ font-size: 80%; }&lt;/style&gt;
   &lt;div id=header&gt;
   &lt;h2&gt;Rhttpd&lt;/h2&gt;
Aaron Radke &lt;br&gt;
2007-11-26 &lt;br&gt;
&lt;em&gt;A really tiny ruby script to start a webserver with cgi support&lt;/em&gt;&lt;p&gt;
&lt;/div&gt;
Download: &lt;a href='/static/file/cgi_handler.rb'&gt;cgi_handler.rb&lt;/a&gt;&lt;pre class="prettyprint"&gt;
require 'webrick'
include WEBrick
   
def start_webrick(config = {})
   # always listen on port 8080
   config.update(:Port =&gt; 8080)
   server = HTTPServer.new(config)
   yield server if block_given?
   ['INT', 'TERM'].each {|signal|
   trap(signal) {server.shutdown}
   }
   server.start
end
   
#start_webrick(:DocumentRoot =&gt; "g:/infoproweb/webfolder/cgi-bin/ruby",:CGIInterpreter =&gt; "g:/ruby/bin/ruby.exe")
#start_webrick(:DocumentRoot =&gt; File.expand_path(".."), :CGIInterpreter =&gt; "c:/ruby/bin/ruby.exe")
   
      
start_webrick( {:CGIInterpreter =&gt; "c:/ruby/bin/ruby.exe"}) {|server|
   cgi_dir = File.expand_path('cgi')
   fh = HTTPServlet::FileHandler
   fh.add_handler("rb",HTTPServlet::CGIHandler);
   fh.add_handler("rbw",HTTPServlet::CGIHandler);
   opts = {:FancyIndexing =&gt;false}
   server.mount("/cgi", fh, "cgi", opts)
   server.mount("/", fh, ".." , opts)
}
#
&lt;/pre&gt;
&lt;div class=aao_footer&gt;
&lt;hr&gt;

&lt;/div&gt;
</description>
      <author>Aaron Radke</author>
      <pubDate>Mon, 26 Nov 2007 15:23:04 +0000</pubDate>
      <link>&lt;a href="/feed/ruby"&gt;/rhttpd&lt;/a&gt;</link>
      <guid>&lt;a href="/feed/ruby"&gt;/rhttpd&lt;/a&gt;</guid>
    </item>
    <item>
      <title>Using the caps key for the control key</title>
      <description>&lt;!-- 
Found 0 labeled equations 
eq ids: 
--&gt;
&lt;!-- 
Found 1 figures 
fig ids: Keyboard-left_keys
--&gt;
&lt;style type="text/css"&gt;pre.code {   background-color: #DDD;   color: #112;   padding: 10px;   font-size: 90%;   overflow: auto;   margin: 4px 0px;   width: 95%;}pre .normal {}pre .comment { color: #005; font-style: italic; }pre .keyword { color: #A00; font-weight: bold; }pre .method { color: #077; }pre .class { color: #074; }pre .module { color: #050; }pre .punct { color: #447; font-weight: bold; }pre .symbol { color: #099; }pre .string { color: #944; }pre .char { color: #F07; }pre .ident { color: #004; }pre .constant { color: #07F; }pre .regex { color: #B66; }pre .number { color: #F99; }pre .attribute { color: #5bb; }pre .global { color: #7FB; }pre .expr { color: #227; }pre .escape { color: #277; }div .aao_footer{ font-size: 80%; }&lt;/style&gt;
   &lt;div id=header&gt;
   &lt;h2&gt;Using the Caps Key for the Control Key&lt;/h2&gt;
Aaron Radke &lt;br&gt;
2007-11-26 &lt;br&gt;
&lt;em&gt;This is a way to make the caps key much more useful&lt;/em&gt;&lt;p&gt;
&lt;/div&gt;
&lt;div style="text-align:center"&gt;&lt;a name="fig_Keyboardleft_keys"&gt;&lt;/a&gt;&lt;a href='/static/fig/Keyboard-left_keys.jpg'&gt;&lt;img src="/static/fig/Keyboard-left_keys_500x500.png" border="none" alt="Keyboard-left_keys_500x500.png" align="center" width="500" &gt;&lt;/a&gt;&lt;!--
&lt;div class="caption"&gt;
Figure  1: none
&lt;/div&gt;
--&gt;&lt;/div&gt;&lt;p&gt;

&lt;h2&gt;&lt;a id="windows"&gt;&lt;/a&gt; Windows 
&lt;/h2&gt;
Double click the following text field to move your caps lock key to a less used key and gain a nicer control key.
&lt;p&gt;
Download: &lt;a href='/static/file/user_swap_caps_lock_as_control_caps_to_scroll.reg'&gt;user_swap_caps_lock_as_control_caps_to_scroll.reg&lt;/a&gt;&lt;div class=aao_footer&gt;
&lt;hr&gt;

&lt;/div&gt;
</description>
      <author>Aaron Radke</author>
      <pubDate>Mon, 26 Nov 2007 15:23:04 +0000</pubDate>
      <link>&lt;a href="/feed/ruby"&gt;/caps_key_for_control&lt;/a&gt;</link>
      <guid>&lt;a href="/feed/ruby"&gt;/caps_key_for_control&lt;/a&gt;</guid>
    </item>
    <item>
      <title>tag and cdt</title>
      <description>&lt;!-- 
Found 0 labeled equations 
eq ids: 
--&gt;
&lt;!-- 
Found 0 figures 
fig ids: 
--&gt;
&lt;style type="text/css"&gt;pre.code {   background-color: #DDD;   color: #112;   padding: 10px;   font-size: 90%;   overflow: auto;   margin: 4px 0px;   width: 95%;}pre .normal {}pre .comment { color: #005; font-style: italic; }pre .keyword { color: #A00; font-weight: bold; }pre .method { color: #077; }pre .class { color: #074; }pre .module { color: #050; }pre .punct { color: #447; font-weight: bold; }pre .symbol { color: #099; }pre .string { color: #944; }pre .char { color: #F07; }pre .ident { color: #004; }pre .constant { color: #07F; }pre .regex { color: #B66; }pre .number { color: #F99; }pre .attribute { color: #5bb; }pre .global { color: #7FB; }pre .expr { color: #227; }pre .escape { color: #277; }div .aao_footer{ font-size: 80%; }&lt;/style&gt;
   &lt;div id=header&gt;
   &lt;h2&gt;Tag and Cdt&lt;/h2&gt;
Aaron Radke &lt;br&gt;
2007-11-26 &lt;br&gt;
&lt;em&gt;quick command line system to &lt;tt&gt;cdt [tag id]&lt;/tt&gt; or &lt;tt&gt;tag [tag id]&lt;/tt&gt; and jump around with tagged name replacements&lt;/em&gt;&lt;p&gt;
&lt;/div&gt;
Download: &lt;a href='/static/file/tag'&gt;tag&lt;/a&gt;&lt;pre class="prettyprint"&gt;
#!/usr/bin/env ruby
#title:tag
#author:Aaron Radke
#date:2008-01-30
#abstract:a simple tagging app to save snippits and retreave them back
#------------
tag_file = "#{ENV['HOME']}/.tags"
   
#puts "ARGV: #{ARGV.join(",")}"
   
key = ARGV.shift
   
if key == "-s" and ARGV.size &gt;= 2
   f = File.open(tag_file,"a")
   tag = ARGV.shift
   value = ARGV.join(" ")
   f.puts "#{tag}\t#{value}"
   f.close
   exit
end
   
unless key
   null
      puts "Requries an argument"
      exit
end
   
tag_string = &lt;&lt;HERE
ar	Aaron Radke
lifeurl	http://lifesened.com
HERE
   
      
tags = Hash.new
tag_string.split(/\n/).each{|row|
   if row =~ /^(\S+)\s+(.*)/
      tags[$1] = $2
   end
}
   
if File.exists?(tag_file)
   f = File.open(tag_file)
   f.each{|row|
      if row =~ /^(\S+)\s+(.*)/
         tags[$1] = $2
      end
   }
   f.close
end
   
if tags.key?(key)
   puts tags[key]
else
   puts "tag not defined"
end
&lt;/pre&gt;
&lt;div class=aao_footer&gt;
&lt;hr&gt;

&lt;/div&gt;
</description>
      <author>Aaron Radke</author>
      <pubDate>Mon, 26 Nov 2007 15:23:04 +0000</pubDate>
      <link>&lt;a href="/feed/ruby"&gt;/cmd_tag&lt;/a&gt;</link>
      <guid>&lt;a href="/feed/ruby"&gt;/cmd_tag&lt;/a&gt;</guid>
    </item>
  </channel>
</rss>
