<file_sep>Gem::Specification.new do |s|
   s.name = "streamtagger"
   s.version = "0.1.6"
   s.authors = "<NAME>"
   s.email = "dramsay on github"
   s.summary = "Streamtagger allows you to tag the current stream playing in iTunes, storing info to a text file"
   s.homepage = "http://github.com/dramsay/streamtagger"
   s.description = s.summary
   s.has_rdoc = false
   s.files = ["README.rdoc", "Changelog", "LICENSE"]
   s.executables = ['stag']
   if s.respond_to? :specification_version then
     current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
     s.specification_version = 2

     if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
       s.add_runtime_dependency(%q<dramsay-rubyosa>, ["0.4.0"])
     else
       s.add_dependency(%q<dramsay-rubyosa>, ["0.4.0"])
     end
   else
     s.add_dependency(%q<dramsay-rubyosa>, ["0.4.0"])
   end  
end
<file_sep>#!/usr/bin/env ruby

require 'rubygems'
require 'rbosa'

if ENV["TAGGER_FILE"]
  tagger_file = File.expand_path(ENV["TAGGER_FILE"])
else
  tagger_file = File.expand_path("~/Desktop/streamtagger.txt")
end

if ARGV[0] == 'list'
  print `cat #{tagger_file}`
elsif ARGV[0] == 'clear'
  `> #{tagger_file}`
elsif ARGV[0] == 'info'
  itunes = OSA.app("iTunes")
  puts itunes.current_stream_title
else
  itunes = OSA.app("iTunes")
  puts itunes.current_stream_title if ENV["TAGGER_INFO"]
  File.open(tagger_file, "a") do |f|
    f.puts itunes.current_stream_title
  end
end
