<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -21,7 +21,6 @@ features/support/mocha.rb
 features/support/time_machine_helpers.rb
 lib/tweet-tail.rb
 lib/tweet-tail/ansi_tweet_formatter.rb
-lib/tweet-tail/html_tweet_formatter.rb
 lib/tweet-tail/cli.rb
 lib/tweet-tail/tweet_poller.rb
 script/console</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,4 @@ require &quot;open-uri&quot;
 
 require &quot;tweet-tail/tweet_poller&quot;
 
-require &quot;tweet-tail/ansi_tweet_formatter&quot;
-
-require &quot;tweet-tail/html_tweet_formatter&quot;
\ No newline at end of file
+require &quot;tweet-tail/ansi_tweet_formatter&quot;
\ No newline at end of file</diff>
      <filename>lib/tweet-tail.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ require 'optparse'
 
 module TweetTail::CLI
   def self.execute(stdout, arguments=[])
-    options = { :polling =&gt; false, :html =&gt; false }
+    options = { :polling =&gt; false, :output_format =&gt; :text }
     
     parser = OptionParser.new do |opts|
       opts.banner = &lt;&lt;-BANNER.gsub(/^          /,'')
@@ -17,7 +17,8 @@ module TweetTail::CLI
               ) { |arg| options[:polling] = true }
       opts.on(&quot;-h&quot;, &quot;--help&quot;,
               &quot;Show this help message.&quot;) { stdout.puts opts; exit }
-      opts.on(&quot;--html&quot;, &quot;output html&quot;) { |arg| options[:html] = true }
+      opts.on(&quot;-y&quot;, &quot;--yaml&quot;, &quot;output yaml&quot;) { |arg| options[:output_format] = :yaml }
+      opts.on(&quot;-j&quot;, &quot;--json&quot;, &quot;output json&quot;) { |arg| options[:output_format] = :json }
       opts.parse!(arguments)
     end
     
@@ -31,24 +32,24 @@ module TweetTail::CLI
       app.extend(TweetTail::AnsiTweetFormatter) if stdout.tty?
       
       app.refresh
-      if options[:html]
-        stdout.puts app.render_latest_results(TweetTail::HtmlTweetFormatter)
-      else
-        stdout.puts app.render_latest_results
-      end
+      render(stdout, app, options[:output_format])
       while(options[:polling])
         Kernel::sleep(15)
         app.refresh
         if app.render_latest_results.size &gt; 0
-          if options[:html]
-            stdout.puts app.render_latest_results(TweetTail::HtmlTweetFormatter)
-          else
-            stdout.puts app.render_latest_results
-          end
+          render(stdout, app, options[:output_format])
         end
       end
     rescue Interrupt
     end
   end
   
+  def self.render(stdout, poller, format)
+    if format == :text
+      stdout.puts poller.render_latest_results
+    else
+      stdout.puts poller.latest_results.send &quot;to_#{format}&quot;.to_sym
+    end
+  end
+  
 end</diff>
      <filename>lib/tweet-tail/cli.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,15 +19,13 @@ class TweetTail::TweetPoller
     @refresh_url    = @latest_feed[&quot;refresh_url&quot;]
   end
   
-  def render_latest_results(formatter = nil, &amp;block)
+  def render_latest_results(&amp;block)
     format_block = block unless block.nil?
     @latest_results.inject(&quot;&quot;) do |output, tweet|
-      if formatter.nil? &amp;&amp; block.nil?
+      if block.nil?
         output += format(tweet)
-      elsif formatter.nil?
-        output += block.call(tweet)
       else
-        output += formatter.format(tweet)
+        output += block.call(tweet)
       end
     end
   end</diff>
      <filename>lib/tweet-tail/tweet_poller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,24 +10,36 @@ class TestTweetPoller &lt; Test::Unit::TestCase
             &quot;text&quot;: &quot;reading my own abstract for JAOO presentation&quot;,
             &quot;from_user&quot;: &quot;drnic&quot;,
             &quot;id&quot;: 1666627310,
+            &quot;from_user_id&quot;: 10890961,
+            &quot;iso_language_code&quot;: &quot;en&quot;,
+            &quot;profile_image_url&quot;: &quot;http://example.com/&quot;,
             &quot;created_at&quot;: &quot;10:45 PM Apr 30th&quot;,
             &quot;source&quot; : &quot;https://twitter.com/drnic/status/1666627310&quot;
         },{
             &quot;text&quot;: &quot;Come speak with Matt at JAOO next week&quot;,
             &quot;from_user&quot;: &quot;theRMK&quot;,
             &quot;id&quot;: 1666334207,
+            &quot;from_user_id&quot;: 10890961,
+            &quot;iso_language_code&quot;: &quot;en&quot;,
+            &quot;profile_image_url&quot;: &quot;http://example.com/&quot;,
             &quot;created_at&quot;: &quot;10:01 PM Apr 30th&quot;,
             &quot;source&quot;: &quot;http://twitter.com/theRMK/statuses/1666334207&quot;
         },{
             &quot;text&quot;: &quot;@VenessaP I think they went out for noodles. #jaoo&quot;,
             &quot;from_user&quot;: &quot;Steve_Hayes&quot;,
             &quot;id&quot;: 1666166639,
+            &quot;from_user_id&quot;: 10890961,
+            &quot;iso_language_code&quot;: &quot;en&quot;,
+            &quot;profile_image_url&quot;: &quot;http://example.com/&quot;,
             &quot;created_at&quot;: &quot;10:01 PM Apr 30th&quot;,
             &quot;source&quot;: &quot;http://not.in.google/&quot;
         },{
             &quot;text&quot;: &quot;Come speak with me at JAOO next week - http:\/\/jaoo.dk\/&quot;,
             &quot;from_user&quot;: &quot;mattnhodges&quot;,
             &quot;id&quot;: 1664823944,
+            &quot;from_user_id&quot;: 10890961,
+            &quot;iso_language_code&quot;: &quot;en&quot;,
+            &quot;profile_image_url&quot;: &quot;http://example.com/&quot;,
             &quot;created_at&quot;: &quot;10:01 PM Apr 30th&quot;,
             &quot;source&quot;: &quot;http://not.in.google/&quot;
         }],
@@ -48,39 +60,61 @@ class TestTweetPoller &lt; Test::Unit::TestCase
     theRMK: Come speak with Matt at JAOO next week
     drnic: reading my own abstract for JAOO presentation
     RESULTS
-    assert_equal(expected, @app.render_latest_results(nil))
+    assert_equal(expected, @app.render_latest_results)
   end
   
-  def test_message_render_html_block
-    expected = &lt;&lt;-RESULTS.gsub(/^    /, '')
-    &lt;div class='tweet'&gt;\nmattnhodges: Come speak with me at JAOO next week - http://jaoo.dk/&lt;br /&gt;\n&lt;a href='http://not.in.google/'&gt;10:01 PM Apr 30th&lt;/a&gt;\n&lt;/div&gt;
-    &lt;div class='tweet'&gt;\nSteve_Hayes: @VenessaP I think they went out for noodles. #jaoo&lt;br /&gt;\n&lt;a href='http://not.in.google/'&gt;10:01 PM Apr 30th&lt;/a&gt;\n&lt;/div&gt;
-    &lt;div class='tweet'&gt;\ntheRMK: Come speak with Matt at JAOO next week&lt;br /&gt;\n&lt;a href='http://twitter.com/theRMK/statuses/1666334207'&gt;10:01 PM Apr 30th&lt;/a&gt;\n&lt;/div&gt;
-    &lt;div class='tweet'&gt;\ndrnic: reading my own abstract for JAOO presentation&lt;br /&gt;\n&lt;a href='https://twitter.com/drnic/status/1666627310'&gt;10:45 PM Apr 30th&lt;/a&gt;\n&lt;/div&gt;
-    RESULTS
-    actual = @app.render_latest_results do |tweet|
-      screen_name = tweet['from_user']
-      created_at = tweet['created_at']
-      link = tweet['source']
-      message = tweet['text']
-      &quot;&lt;div class='tweet'&gt;\n#{screen_name}: #{message}&lt;br /&gt;\n&lt;a href='#{link}'&gt;#{created_at}&lt;/a&gt;\n&lt;/div&gt;\n&quot;
-    end
-    assert_equal(expected, actual)
+  def test_ready_for_refresh
+    assert_equal('?since_id=1682666650&amp;q=jaoo', @app.refresh_url)
   end
   
-  def test_message_render_html_formatter
+  def test_message_render_yaml
     expected = &lt;&lt;-RESULTS.gsub(/^    /, '')
-    &lt;div class='tweet'&gt;\nmattnhodges: Come speak with me at JAOO next week - http://jaoo.dk/&lt;br /&gt;\n&lt;a href='http://not.in.google/'&gt;10:01 PM Apr 30th&lt;/a&gt;\n&lt;/div&gt;
-    &lt;div class='tweet'&gt;\nSteve_Hayes: @VenessaP I think they went out for noodles. #jaoo&lt;br /&gt;\n&lt;a href='http://not.in.google/'&gt;10:01 PM Apr 30th&lt;/a&gt;\n&lt;/div&gt;
-    &lt;div class='tweet'&gt;\ntheRMK: Come speak with Matt at JAOO next week&lt;br /&gt;\n&lt;a href='http://twitter.com/theRMK/statuses/1666334207'&gt;10:01 PM Apr 30th&lt;/a&gt;\n&lt;/div&gt;
-    &lt;div class='tweet'&gt;\ndrnic: reading my own abstract for JAOO presentation&lt;br /&gt;\n&lt;a href='https://twitter.com/drnic/status/1666627310'&gt;10:45 PM Apr 30th&lt;/a&gt;\n&lt;/div&gt;
+    --- 
+    - created_at: 10:01 PM Apr 30th\n  profile_image_url: http://example.com/\n  from_user: mattnhodges\n  text: Come speak with me at JAOO next week - http://jaoo.dk/\n  id: 1664823944\n  from_user_id: 10890961\n  iso_language_code: en\n  source: http://not.in.google/
+    - created_at: 10:01 PM Apr 30th\n  profile_image_url: http://example.com/\n  from_user: Steve_Hayes\n  text: \&quot;@VenessaP I think they went out for noodles. #jaoo\&quot;\n  id: 1666166639\n  from_user_id: 10890961\n  iso_language_code: en\n  source: http://not.in.google/
+    - created_at: 10:01 PM Apr 30th\n  profile_image_url: http://example.com/\n  from_user: theRMK\n  text: Come speak with Matt at JAOO next week\n  id: 1666334207\n  from_user_id: 10890961\n  iso_language_code: en\n  source: http://twitter.com/theRMK/statuses/1666334207
+    - created_at: 10:45 PM Apr 30th\n  profile_image_url: http://example.com/\n  from_user: drnic\n  text: reading my own abstract for JAOO presentation\n  id: 1666627310\n  from_user_id: 10890961\n  iso_language_code: en\n  source: https://twitter.com/drnic/status/1666627310
     RESULTS
-    actual = @app.render_latest_results(TweetTail::HtmlTweetFormatter)
+    actual = @app.latest_results.to_yaml
     assert_equal(expected, actual)
   end
   
-  def test_ready_for_refresh
-    assert_equal('?since_id=1682666650&amp;q=jaoo', @app.refresh_url)
+  def test_message_render_json
+    expected =
+    [{&quot;created_at&quot;=&gt;&quot;10:01 PM Apr 30th&quot;,
+      &quot;profile_image_url&quot;=&gt;&quot;http://example.com/&quot;,
+      &quot;from_user&quot;=&gt;&quot;mattnhodges&quot;,
+      &quot;text&quot;=&gt;&quot;Come speak with me at JAOO next week - http://jaoo.dk/&quot;,
+      &quot;id&quot;=&gt;1664823944,
+      &quot;from_user_id&quot;=&gt;10890961,
+      &quot;iso_language_code&quot;=&gt;&quot;en&quot;,
+      &quot;source&quot;=&gt;&quot;http://not.in.google/&quot;},
+     {&quot;created_at&quot;=&gt;&quot;10:01 PM Apr 30th&quot;,
+      &quot;profile_image_url&quot;=&gt;&quot;http://example.com/&quot;,
+      &quot;from_user&quot;=&gt;&quot;Steve_Hayes&quot;,
+      &quot;text&quot;=&gt;&quot;@VenessaP I think they went out for noodles. #jaoo&quot;,
+      &quot;id&quot;=&gt;1666166639,
+      &quot;from_user_id&quot;=&gt;10890961,
+      &quot;iso_language_code&quot;=&gt;&quot;en&quot;,
+      &quot;source&quot;=&gt;&quot;http://not.in.google/&quot;},
+     {&quot;created_at&quot;=&gt;&quot;10:01 PM Apr 30th&quot;,
+      &quot;profile_image_url&quot;=&gt;&quot;http://example.com/&quot;,
+      &quot;from_user&quot;=&gt;&quot;theRMK&quot;,
+      &quot;text&quot;=&gt;&quot;Come speak with Matt at JAOO next week&quot;,
+      &quot;id&quot;=&gt;1666334207,
+      &quot;from_user_id&quot;=&gt;10890961,
+      &quot;iso_language_code&quot;=&gt;&quot;en&quot;,
+      &quot;source&quot;=&gt;&quot;http://twitter.com/theRMK/statuses/1666334207&quot;},
+     {&quot;created_at&quot;=&gt;&quot;10:45 PM Apr 30th&quot;,
+      &quot;profile_image_url&quot;=&gt;&quot;http://example.com/&quot;,
+      &quot;from_user&quot;=&gt;&quot;drnic&quot;,
+      &quot;text&quot;=&gt;&quot;reading my own abstract for JAOO presentation&quot;,
+      &quot;id&quot;=&gt;1666627310,
+      &quot;from_user_id&quot;=&gt;10890961,
+      &quot;iso_language_code&quot;=&gt;&quot;en&quot;,
+      &quot;source&quot;=&gt;&quot;https://twitter.com/drnic/status/1666627310&quot;}]
+    actual = @app.latest_results
+    assert_equal(expected, actual)
   end
   
   def test_refresh_data
@@ -98,7 +132,7 @@ class TestTweetPoller &lt; Test::Unit::TestCase
     expected = &lt;&lt;-RESULTS.gsub(/^    /, '')
     CaioProiete: Wish I could be at #JAOO Australia...
     RESULTS
-    assert_equal(expected, @app.render_latest_results(nil))
+    assert_equal(expected, @app.render_latest_results)
     assert_equal('?since_id=1711269079&amp;q=jaoo', @app.refresh_url)
   end
 end</diff>
      <filename>test/test_tweet_poller.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/tweet-tail/html_tweet_formatter.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>2f25168f0eeea608d37b09e11726b35ff5acaf29</id>
    </parent>
  </parents>
  <author>
    <name>gaustin</name>
    <email>gaustin@gmail.com</email>
  </author>
  <url>http://github.com/gaustin/tweet-tail/commit/4ded78ee921e7c7846d13ccf31d0ac08c5e47c50</url>
  <id>4ded78ee921e7c7846d13ccf31d0ac08c5e47c50</id>
  <committed-date>2009-06-08T10:26:06-07:00</committed-date>
  <authored-date>2009-06-08T10:26:06-07:00</authored-date>
  <message>Removed previously added HTML mode. Added YAML and JSON output to CLI...
Still in that floundering stage with actually designing Ruby code.</message>
  <tree>55d6f3f34c81d424cd18ad495ce21b13d1dbc68e</tree>
  <committer>
    <name>gaustin</name>
    <email>gaustin@gmail.com</email>
  </committer>
</commit>
