<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,7 @@
 define(&quot;INPUT_RSS_CONSIDERED&quot;,      &quot;http://pipes.yahoo.com/pipes/pipe.run?_id=ADbNqOil3BGGzfPa6kjTQA&amp;_render=rss&quot;);
 define(&quot;INPUT_RSS_CONSCIOUSNESS&quot;,   &quot;http://pipes.yahoo.com/pipes/pipe.run?_id=f41d64550e674b7f01bad0f3c49d46f8&amp;_render=rss&quot;);
 define(&quot;INPUT_RSS_OTHERS_SAID&quot;,     &quot;http://pipes.yahoo.com/pipes/pipe.run?_id=ygKh4Siu3BGqyNyQJphxuA&amp;_render=rss&quot;);
+define(&quot;INPUT_RSS_EVENTS&quot;,          &quot;http://pipes.yahoo.com/pipes/pipe.run?_id=9h81k_pR3hGH5QGoPm7D0g&amp;_render=rss&quot;);
 define(&quot;FILE_TEMPLATE&quot;,             &quot;/templates/index.tpl&quot;);
 define(&quot;FILE_OUTPUT&quot;,               &quot;/index.html&quot;);
 define(&quot;TEN_WORD_USER&quot;,             &quot;workingwithme&quot;);
@@ -15,6 +16,7 @@ function __autoload($class_name) {
 $considered = getConsideredThoughts();
 $stream = getStreamOfConsciousness();
 $others = getOthersSaid();
+$events = getEvents();
 
 if ( !$considered || !$stream || !$others ) {
     return;
@@ -24,8 +26,8 @@ mb_internal_encoding(&quot;UTF-8&quot;);
 
 $template = getTemplate();
 
-$template = str_replace( array('##consideredthoughts##', '##streamofconsciousness##', '##otherssaid##'),
-                         array($considered, $stream, $others),
+$template = str_replace( array('##consideredthoughts##', '##streamofconsciousness##', '##otherssaid##', '###events###'),
+                         array($considered, $stream, $others, $events),
                          $template );
 saveOutput($template);
 
@@ -64,6 +66,42 @@ function getOthersSaid() {
     return getHtmlForStream('otherssaid', INPUT_RSS_OTHERS_SAID.$rand);
 }
 
+function getEvents() {
+    $rand = &quot;&amp;rand=&quot;.time();
+    $data = getDataFromFeed( INPUT_RSS_EVENTS.$rand );
+
+    $items = array();
+    foreach ( $data-&gt;channel-&gt;item as $item ) {
+        $items[] = $item;
+    }
+    
+    if ( 0 === count($items) ) {
+        return '';
+    }
+    
+    $items = array_reverse($items);
+    
+    $output = '&lt;p&gt;You may remember me from such events as ';
+
+    $numItems = count($items);
+    $doneItems = 0;
+    foreach ($items as $item) {
+        $doneItems++;
+        
+        $joiner = '.';
+        if ($doneItems &lt; $numItems - 1) {
+            $joiner = ', ';
+        } else if ($doneItems &lt; $numItems) {
+            $joiner = ' and ';
+        }
+
+        $output .= &quot;&lt;a href='{$item-&gt;link}'&gt;{$item-&gt;title}&lt;/a&gt;{$joiner}&quot;;
+    }
+    $output .= '&lt;/p&gt;';
+
+    return $output;
+}
+
 function getHtmlForStream($stream, $url) {
     $data = getDataFromFeed( $url );
 </diff>
      <filename>refresh.php</filename>
    </modified>
    <modified>
      <diff>@@ -367,13 +367,7 @@
     &lt;div id=&quot;doc4&quot;&gt;                   
         &lt;div id=&quot;hd&quot;&gt;
             &lt;h1&gt;&lt;span&gt;Hi, &lt;span&gt;I'm&lt;/span&gt;&lt;/span&gt; Neil Crosby&lt;/h1&gt;
-            &lt;p&gt;
-                You may remember me from such events as
-                &lt;a href=&quot;http://upcoming.yahoo.com/event/2142631/&quot;&gt;Open Hack 2009: London&lt;/a&gt;,
-                &lt;a href=&quot;http://upcoming.yahoo.com/event/2620372/&quot;&gt;Pub Standards XLII&lt;/a&gt;
-                and
-                &lt;a href=&quot;http://upcoming.yahoo.com/event/2566869/&quot;&gt;BarCamp Leeds {2009}&lt;/a&gt;.
-            &lt;/p&gt;
+            ###events###
             &lt;ul&gt;
                 &lt;li&gt;&lt;a href=&quot;/vcard&quot; rel=&quot;me&quot;&gt;&lt;img src=&quot;/images/vcard.png&quot; alt=&quot;Neil Crosby's vCard&quot; title=&quot;Neil Crosby's vCard&quot;&gt;&lt;/a&gt;&lt;/li&gt;
                 &lt;!--&lt;li&gt;&lt;a href=&quot;http://upcoming.yahoo.com/user/73013/&quot; rel=&quot;me&quot;&gt;&lt;img src=&quot;/images/ical.png&quot; alt=&quot;Neil Crosby's Upcoming Events&quot;&gt;&lt;/a&gt;&lt;/li&gt;--&gt;</diff>
      <filename>templates/index.tpl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1e6aa378a63736b528c4eaed22ef7c981552cd26</id>
    </parent>
  </parents>
  <author>
    <name>Neil Crosby</name>
    <email>neil@thetenwordreview.com</email>
  </author>
  <url>http://github.com/NeilCrosby/lifestream/commit/b73e16e3553ae8813315cf675b45c21c19e86add</url>
  <id>b73e16e3553ae8813315cf675b45c21c19e86add</id>
  <committed-date>2009-06-05T09:29:30-07:00</committed-date>
  <authored-date>2009-06-05T09:29:30-07:00</authored-date>
  <message>Last 3 events now pulled in from a pipe.  Hooray</message>
  <tree>addd9dc80057f9cc083dd101695a047af4902990</tree>
  <committer>
    <name>Neil Crosby</name>
    <email>neil@thetenwordreview.com</email>
  </committer>
</commit>
