Nicer titles for updates.rss (and hence Twitter)

This commit is contained in:
Steve Purcell 2013-01-15 16:17:45 +00:00
parent 277a7ac134
commit 66fd66c514

View file

@ -21,13 +21,14 @@
package = OpenStruct.new package = OpenStruct.new
package.name = pkgname package.name = pkgname
package.version = version package.version = version
package.description = descr.gsub(/ \[source:.*$/, '')
hour_portion = versions[1] ? sprintf("%04d", versions[1]) : "0000" hour_portion = versions[1] ? sprintf("%04d", versions[1]) : "0000"
package.build_time = Time.new(version[0..3].to_i, version[4..5].to_i, version[6..7].to_i, hour_portion[0..1].to_i, hour_portion[2..3].to_i) package.build_time = Time.new(version[0..3].to_i, version[4..5].to_i, version[6..7].to_i, hour_portion[0..1].to_i, hour_portion[2..3].to_i)
package.url = "#{base_url}packages/#{pkgname}-#{version}." + (pkgtype == "single" ? "el" : "tar") package.url = "#{base_url}packages/#{pkgname}-#{version}." + (pkgtype == "single" ? "el" : "tar")
package.info_url = "#{base_url}##{pkgname}" package.info_url = "#{base_url}##{pkgname}"
%> %>
<item> <item>
<title>Package update: <%= package.name %> is now at version <%= package.version %></title> <title><%= package.name %> (<%= package.version %>) --- <%= package.description %></title>
<description>The <%= package.name %> package in MELPA has been updated to version <%= package.version %>.</description> <description>The <%= package.name %> package in MELPA has been updated to version <%= package.version %>.</description>
<pubDate><%= package.build_time.rfc822 %></pubDate> <pubDate><%= package.build_time.rfc822 %></pubDate>
<guid isPermaLink="true"><%= package.url %></guid> <guid isPermaLink="true"><%= package.url %></guid>