<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/simplabs/excellent/parsing/loc_parser.rb</filename>
    </added>
    <added>
      <filename>spec/data/loc_parser_1.rb</filename>
    </added>
    <added>
      <filename>spec/data/loc_parser_2.rb</filename>
    </added>
    <added>
      <filename>spec/data/loc_parser_3.rb</filename>
    </added>
    <added>
      <filename>spec/parsing/locparser_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -46,7 +46,7 @@ To analyse all the models in your Rails application, just do
 in your &lt;tt&gt;RAILS_ROOT&lt;/tt&gt;. You can also invoke analysation through the Simplabs::Excellent::Runner class. Excellent can also produce HTML output. To
 get a formatted HTML report, just specify &lt;tt&gt;html:&lt;filename&gt;&lt;/tt&gt;:
 
-  excellent html:out.html app/models
+  excellent -o out.html app/models
 
 You can also use Excellent in a Rake task:
 </diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,31 +1,49 @@
 #!/usr/bin/env ruby
 
-$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + &quot;/../lib&quot;))
-
 require 'simplabs/excellent'
 require 'pathname'
+require 'optparse'
 
-excellent = Simplabs::Excellent::Runner.new
+options = {}
 
-if ARGV.first =~ /html:[^\s]+/
-  begin
-    output = File.open(ARGV.first.sub(/html:/, ''), 'w+')
-    formatter = Simplabs::Excellent::Formatters::Html.new(output)
-    ARGV.shift
-  rescue
+optparse = OptionParser.new do |opt|
+  opt.banner = 'Usage: excellent [OPTIONS] &lt;PATH1&gt; [&lt;PATH2&gt; ...]'
+  opt.on('--output', '-o [FILE]', 'Write HTML output to [FILE].') do |target|
+    options[:output] = target
+  end
+  opt.on_tail('--help', '-h', 'Help') do
+    puts optparse
+    exit
   end
-else
-  formatter = Simplabs::Excellent::Formatters::Text.new
 end
 
-if ARGV.empty?
+optparse.parse!
+
+target   = options[:output]
+paths    = ARGV.dup
+
+if paths.empty?
   puts &quot;\n  You must specify one or more directories to analyse, e.g.:\n&quot;
-  puts &quot;\n    excellent app/\n\n&quot;
+  puts &quot;\n    excellent lib/\n\n&quot;
   exit 1
 end
 
+if target
+  begin
+    fileio = File.open(target, 'w+')
+    formatter = Simplabs::Excellent::Formatters::Html.new(fileio)
+  rescue Errno::ENOENT
+    puts &quot;\n  #{target} cannot be opened for writing. Specify a file name like so:\n&quot;
+    puts &quot;\n    excellent -o excellent.html lib/\n\n&quot;
+  end
+else
+  formatter = Simplabs::Excellent::Formatters::Text.new
+end
+
+excellent = Simplabs::Excellent::Runner.new
+
 begin
-  excellent.check_paths(ARGV, formatter)
+  excellent.check_paths(paths, formatter)
 rescue ArgumentError
   puts &quot;\n** Excellent cannot find the paths specified!\n\n&quot;
   exit 1</diff>
      <filename>bin/excellent</filename>
    </modified>
    <modified>
      <diff>@@ -25,14 +25,7 @@ module Simplabs
         end
 
         def warning(warning)
-          lines = CodeRay.scan_file(warning.filename).html.split(&quot;\n&quot;)
-          from_line = [warning.line_number - 5, 0].max
-          to_line = [warning.line_number + 5, lines.count].min
-          i = from_line
-          highlighted = lines[from_line..to_line].map do |line|
-            %Q(&lt;div#{' class=&quot;highlight&quot;' if (i += 1) == warning.line_number}&gt;&lt;span class=&quot;lineNumber&quot;&gt;#{i}&lt;/span&gt;#{line}&lt;/div&gt;)
-          end.join(&quot;\n&quot;)
-          @stream.write(WARNING_TEMPLATE.sub('{{line_number}}', warning.line_number.to_s).sub('{{message}}', warning.message).sub('{{code}}', highlighted))
+          @stream.write(WARNING_TEMPLATE.sub('{{line_number}}', warning.line_number.to_s).sub('{{message}}', warning.message))
         end
 
         def end
@@ -236,7 +229,6 @@ module Simplabs
         WARNING_TEMPLATE = &lt;&lt;-END
           &lt;dd&gt;
             &lt;span class=&quot;lineNumber&quot;&gt;Line &lt;span class=&quot;number&quot;&gt;{{line_number}}&lt;/span&gt;&lt;/span&gt;{{message}}
-            &lt;pre&gt;{{code}}&lt;/pre&gt;
           &lt;/dd&gt;
         END
 </diff>
      <filename>lib/simplabs/excellent/formatters/html.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cfddc0dfbeee1dec86c748c569c84e754717a68f</id>
    </parent>
    <parent>
      <id>50506778e381abde7dd43dc21418f40b965a6ed2</id>
    </parent>
  </parents>
  <author>
    <name>Marco Otte-Witte</name>
    <email>marco.otte-witte@simplabs.com</email>
  </author>
  <url>http://github.com/simplabs/excellent/commit/977d1406e68aab0c52e97d2e85ae2897d8888684</url>
  <id>977d1406e68aab0c52e97d2e85ae2897d8888684</id>
  <committed-date>2009-10-14T13:11:23-07:00</committed-date>
  <authored-date>2009-10-14T13:11:23-07:00</authored-date>
  <message>Merge branch 'integration'

Conflicts:
	History.txt
	lib/simplabs/excellent/formatters/html.rb</message>
  <tree>c5cc8159d97a03f8a3d07f34f722055b765b5d48</tree>
  <committer>
    <name>Marco Otte-Witte</name>
    <email>marco.otte-witte@simplabs.com</email>
  </committer>
</commit>
