<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>planet/formatter.rb</filename>
    </added>
    <added>
      <filename>planet/hamlformatter.rb</filename>
    </added>
    <added>
      <filename>planet/publisher.rb</filename>
    </added>
    <added>
      <filename>planet/xsltformatter.rb</filename>
    </added>
    <added>
      <filename>splice.rb</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/author_email.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/author_name.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/author_uri.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/content_html.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/content_lang.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/content_text.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/content_xhtml.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/content_xhtml2.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/enclosure_href.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/enclosure_length.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/enclosure_type.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/feed_feed.ini</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/feed_generator.ini</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/feed_link.ini</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/feed_name.ini</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/feed_owner_email.ini</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/feed_owner_name.ini</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/id.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/id_only_content.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/id_only_description.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/id_only_link.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/id_only_title.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/link_href.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/link_rel.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/link_type.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/new_channel.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/new_channel_date.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/new_date.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/planet_name.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/published.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/rights.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_author.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_icon.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_id.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_link.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_logo.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_planet_message.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_planet_name.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_rights.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_subtitle.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_title.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/source_updated.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/summary_html.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/summary_lang.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/summary_text.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/summary_xhtml.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/title_html.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/title_lang.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/title_text.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/title_xhtml.xml</filename>
    </added>
    <added>
      <filename>test/data/filter/haml/updated.xml</filename>
    </added>
    <added>
      <filename>test/haml.rb</filename>
    </added>
    <added>
      <filename>themes/intertwingly/atom.xml.xslt</filename>
    </added>
    <added>
      <filename>themes/intertwingly/basic.ini</filename>
    </added>
    <added>
      <filename>themes/intertwingly/default.css</filename>
    </added>
    <added>
      <filename>themes/intertwingly/favicon.ico</filename>
    </added>
    <added>
      <filename>themes/intertwingly/feed-icon-10x10.png</filename>
    </added>
    <added>
      <filename>themes/intertwingly/index.html.haml</filename>
    </added>
    <added>
      <filename>themes/intertwingly/personalize.js</filename>
    </added>
    <added>
      <filename>themes/intertwingly/rss10.xml.haml</filename>
    </added>
    <added>
      <filename>themes/intertwingly/validate.html.xslt</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,22 @@
+HAML FOR MARS release 0.4
+
+To run the haml example, execute:
+
+	rake setup
+	rake planet
+
+and point your browser to yourdir/index.html
+
+To play with templates once the cache has been built:
+
+	rake splice
+
+Setup copies in config and .haml templates for the intertwingly theme.
+The various clean tasks remove the extra files. See rake -T
+
+
+Previously on Planet Mars...
+
 To verify that you have the necessary prereqs installed, execute:
 
   rake prereqs</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,60 @@
 task :default =&gt; [:test]
 
+desc &quot;Run the unit tests&quot;
 task :test do
   ruby &quot;-rubygems&quot;, &quot;test.rb&quot;
 end
 
+desc &quot;Test for Mars prerequisites&quot;
 task :prereqs do
   ruby &quot;-rubygems&quot;, &quot;prereqs.rb&quot;
 end
+
+desc &quot;Clean up published files&quot;
+task :clean do
+  CLEAN_FILES = FileList['./*.xml', './*.html']
+  CLEAN_FILES.each do |fn|
+    rm fn 
+  end
+  rmdir &quot;images&quot;
+end
+
+desc &quot;Clean up all files&quot;
+task :clean_all do
+  CLEAN_ALL_FILES = FileList['./*.xml', './*.html', './*.haml', './*.xslt', './*.ini', './*.css', './*.ico', './*.js', './images/*', &quot;source/*&quot;, &quot;http/*&quot;, &quot;entry/*&quot;]
+  CLEAN_ALL_FILES.each do |fn|
+    rm fn 
+  end
+  rmdir &quot;images&quot;
+  rmdir &quot;source&quot;
+  rmdir &quot;http&quot;
+  rmdir &quot;entry&quot;
+end
+
+desc &quot;Clean up cache files&quot;
+task :clean_cache do
+  CLEAN_CACHE_FILES = FileList[ &quot;source/*&quot;, &quot;http/*&quot;, &quot;entry/*&quot;]
+  CLEAN_CACHE_FILES.each do |fn|
+    rm fn 
+  end
+  rmdir &quot;source&quot;
+  rmdir &quot;http&quot;
+  rmdir &quot;entry&quot;
+end
+
+desc &quot;Install config files for haml/intertwingly example&quot;
+task :setup do
+  FileList['./themes/intertwingly/*'].each do |f| cp &quot;#{f}&quot;, &quot;.&quot;  end
+  mkdir &quot;images&quot;
+  mv &quot;feed-icon-10x10.png&quot;, &quot;images&quot;
+end
+
+desc &quot;Run planet for haml example&quot;
+task :planet do
+  ruby &quot;planet.rb&quot;, &quot;basic.ini&quot;
+end
+
+desc &quot;Splice planet for haml example&quot;
+task :splice do
+  ruby &quot;splice.rb&quot;, &quot;basic.ini&quot;
+end</diff>
      <filename>Rakefile.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,6 +7,13 @@ module Planet
     @@config
   end
 
+  def Planet.predefine_options(planet_hash)
+    planet_hash['name'] = &quot;Unconfigured Planet&quot; unless planet_hash['name'] 
+    planet_hash['link'] = '' unless planet_hash['link'] 
+    planet_hash['date_format'] = &quot;%B %d, %Y %I:%M %p&quot; unless planet_hash['date_format'] 
+    planet_hash['new_date_format'] = &quot;%B %d, %Y&quot; unless planet_hash['new_date_format'] 
+  end
+
   # Configuration parser compatible with the data format supported by Python:
   # http://docs.python.org/lib/module-ConfigParser.html
   class PythonConfigParser &lt; DelegateClass(Hash)
@@ -85,6 +92,8 @@ module Planet
 
       planet = self['Planet']
 
+      Planet.predefine_options(planet)      
+
       Planet.log_format planet['log_format'] if planet['log_format']
       Planet.log_level  planet['log_level']  if planet['log_level']
     end</diff>
      <filename>planet/config.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,12 @@ module Planet
     doc = Planet::Transmogrify.parse(open(source))
     doc.attributes['xml:base'] = source
 
-    # augment the document with feed parser attributes
+    Planet.add_attrs(doc)
+  end
+
+  # Augment a document with feed parser attributes
+  def Planet.add_attrs doc
+
     class &lt;&lt; doc
       attr_accessor :feed, :entries
     end
@@ -75,7 +80,7 @@ module Planet
   end
 
   class CommonElements &lt; UserDict
-    text_element :id
+    text_element :id, :updated, :published
     alias :guid :id
 
     text_construct :rights
@@ -111,14 +116,6 @@ module Planet
       @node.elements.to_a('contributor').map {|node| Author.new(node)}
     end
 
-    def categories
-      tags.map {|tag| [tag.scheme, tag.term]}
-    end
-
-    def category
-      tags.first.term rescue nil
-    end
-
     def author
       author_detail.to_s
     end
@@ -145,6 +142,24 @@ module Planet
     def generator_detail
       Generator.new(@node.elements['generator'])
     end
+
+    def message
+      element = @node.elements['planet:message']
+      element ? element.texts.map {|t| t.value}.join : nil
+    end
+
+    def name
+      element = @node.elements['planet:name']
+      element ? element.texts.map {|t| t.value}.join : nil
+    end
+    
+    def sources
+      @node.elements.to_a('planet:source').map {|node| Feed.new(node)}
+    end
+    
+    def url
+      links.select {|link| link.rel=='self'}.first.href rescue nil
+    end
   end
 
   class Entry &lt; CommonElements
@@ -156,6 +171,22 @@ module Planet
       @node.elements.to_a('content').map {|node| TextConstruct.new(node)}
     end
 
+    def enclosure_href
+      enclosures.first.href rescue nil
+    end
+
+    def enclosure_length
+      enclosures.first.length rescue nil
+    end
+
+    def enclosure_type
+      if enclosures.first.is_a?(Planet::Link)
+        return enclosures.first.type
+      else
+        return nil
+      end
+    end
+
     def enclosures
       links.select {|link| link.rel == 'enclosure'}
     end
@@ -214,6 +245,10 @@ module Planet
       url_norm(@node.xmlbase)
     end
 
+    def language
+      @node.attributes['xml:lang']
+    end
+
   private
 
     # DOM to string
@@ -255,7 +290,11 @@ module Planet
     end
 
     def to_s
-      email ? &quot;#{name} (#{email})&quot; : &quot;#{name}&quot;
+      if name
+        email ? &quot;#{name} (#{email})&quot; : &quot;#{name}&quot;
+      else
+        &quot;#{email}&quot;
+      end
     end
 
     alias :url :uri</diff>
      <filename>planet/harvest.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
 require 'planet/config'
-require 'planet/style'
 require 'planet/xmlparser'
 require 'fileutils'
 require 'time'
+require 'planet/publisher'
 
 module Planet
 
@@ -90,17 +90,6 @@ module Planet
     end
 
     # apply templates
-    config['template_files'].split.each do |template|
-      next unless template =~ /^ .* \/ (.*) \. (\w+)/x
-
-      if $2 != 'xslt'
-        Planet.log.warn &quot;#{$2}: not yet supported&quot;
-      else
-        File.open(File.join(output_dir,$1),'w') do |file|
-          Planet.log.info &quot;Processing template #{template}&quot;
-          file.write Planet::Xslt.process(template, feed)
-        end
-      end
-    end
+    TemplatePublisher.new.publish_feed(config['template_files'], feed)
   end
 end</diff>
      <filename>planet/splice.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>planet/style.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>41bfc6f06cfe0c6dc83a5ed719f9f6e0ed0205c0</id>
    </parent>
  </parents>
  <author>
    <name>Jim Holt</name>
    <email>jim.holt3@gmail.com</email>
  </author>
  <url>http://github.com/rubys/mars/commit/a4c9e7e1e7c6d5e675a6a6ceddc9150ae87ff746</url>
  <id>a4c9e7e1e7c6d5e675a6a6ceddc9150ae87ff746</id>
  <committed-date>2008-04-09T05:40:58-07:00</committed-date>
  <authored-date>2008-04-09T05:40:58-07:00</authored-date>
  <message>haml templates for mars, v0.4</message>
  <tree>ea843df39ee97243590113850876b4826c4cf05a</tree>
  <committer>
    <name>Jim Holt</name>
    <email>jim.holt3@gmail.com</email>
  </committer>
</commit>
