<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -47,6 +47,9 @@ class Train:
   def timeleft(self):
     return self.time - self.distance
     
+  def display(self):
+      return (self.timeleft() &lt; 30)
+    
   def stop_short(self):
     return re.sub(r'\b(St|Ave)\b','',self.stop).replace('Sunset Tunnel East Portal','Sunset Tunnel')
     </diff>
      <filename>main.py</filename>
    </modified>
    <modified>
      <diff>@@ -4,33 +4,35 @@
   &lt;h1&gt;When should {{who}} leave for work?&lt;/h1&gt;
   &lt;ul&gt;
   {% for train in trains %}
-    {% if train.is_past %}
-      &lt;li class=&quot;gone&quot;&gt;
-        The {{train.route_short}} 
-        {% if train.show_destination %}
-          to {{train.destination}}
-        {% endif %}
+    {% if train.display %}
+      {% if train.is_past %}
+        &lt;li class=&quot;gone&quot;&gt;
+          The {{train.route_short}} 
+          {% if train.show_destination %}
+            to {{train.destination}}
+          {% endif %}
         
-        {% if train.time %}
-          leaves in {{train.time}} min{{train.time|pluralize }}
-        {% else %} 
-          is leaving now
-        {% endif %}
-        from {{train.stop_short}}
-      &lt;/li&gt;
-    {% else %}
-      &lt;li {% ifchanged train.is_past %}id=&quot;next&quot;{% endifchanged %}&gt;Go 
-        {% if train.timeleft %}
-          in &lt;b&gt;{{train.timeleft}}&lt;/b&gt; minute{{train.timeleft|pluralize }}
-        {% else %}
-          &lt;b&gt;now&lt;/b&gt;
-        {% endif %}
-        to get the &lt;b&gt;{{train.route}}&lt;/b&gt;&lt;br&gt;&lt;small&gt;leaving in {{train.time}} min{{train.time|pluralize }} from {{train.stop}}
-        {% if train.show_destination %}
-          &lt;br&gt;going to {{train.destination}}
-        {% endif %}
-        &lt;/small&gt;
-      &lt;/li&gt;
+          {% if train.time %}
+            leaves in {{train.time}} min{{train.time|pluralize }}
+          {% else %} 
+            is leaving now
+          {% endif %}
+          from {{train.stop_short}}
+        &lt;/li&gt;
+      {% else %}
+        &lt;li {% ifchanged train.is_past %}id=&quot;next&quot;{% endifchanged %}&gt;Go 
+          {% if train.timeleft %}
+            in &lt;b&gt;{{train.timeleft}}&lt;/b&gt; minute{{train.timeleft|pluralize }}
+          {% else %}
+            &lt;b&gt;now&lt;/b&gt;
+          {% endif %}
+          to get the &lt;b&gt;{{train.route}}&lt;/b&gt;&lt;br&gt;&lt;small&gt;leaving in {{train.time}} min{{train.time|pluralize }} from {{train.stop}}
+          {% if train.show_destination %}
+            &lt;br&gt;going to {{train.destination}}
+          {% endif %}
+          &lt;/small&gt;
+        &lt;/li&gt;
+      {% endif %}
     {% endif %}
   {% endfor %}
   &lt;/ul&gt;</diff>
      <filename>templates/index.html</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e5137a3991c4a17cd8c22285506079d9f32217e2</id>
    </parent>
  </parents>
  <author>
    <name>Paul Hammond</name>
    <email>mail@paranoidfish.org</email>
  </author>
  <url>http://github.com/paulhammond/minimuni/commit/37dd9374f5bb4f1202862e7d9d9cb4659168e6fb</url>
  <id>37dd9374f5bb4f1202862e7d9d9cb4659168e6fb</id>
  <committed-date>2009-11-08T22:25:18-08:00</committed-date>
  <authored-date>2009-11-08T22:25:18-08:00</authored-date>
  <message>only display trains in the next 30 minutes or so</message>
  <tree>6fe638ee89aed5934c07aa515d67bce9cb6a62e7</tree>
  <committer>
    <name>Paul Hammond</name>
    <email>mail@paranoidfish.org</email>
  </committer>
</commit>
