mirror of
https://github.com/correl/melpa.git
synced 2024-12-01 11:09:53 +00:00
38 lines
1.7 KiB
Text
38 lines
1.7 KiB
Text
<?xml version="1.0" encoding="UTF-8"?>
|
|
<rss version="2.0"
|
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
|
|
xmlns:atom="http://www.w3.org/2005/Atom">
|
|
<% base_url = "http://melpa.milkbox.net/" %>
|
|
<channel>
|
|
<title>MELPA package updates</title>
|
|
<link>http://melpa.milkbox.net</link>
|
|
<atom:link href="<%= base_url %>updates.rss" rel="self" type="application/rss+xml" />
|
|
<language>en-us</language>
|
|
<ttl>40</ttl>
|
|
<description>News about package updates</description>
|
|
<%
|
|
require 'json'
|
|
require 'time'
|
|
require 'ostruct'
|
|
JSON.parse(File.open("../archive.json").read).each do |pkgname, info|
|
|
versions, deps, descr, pkgtype = info
|
|
version = versions.join('.')
|
|
package = OpenStruct.new
|
|
package.name = pkgname
|
|
package.version = version
|
|
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.url = "#{base_url}packages/#{pkgname}-#{version}." + (pkgtype == "single" ? "el" : "tar")
|
|
package.info_url = "#{base_url}##{pkgname}"
|
|
%>
|
|
<item>
|
|
<title>Package update: <%= package.name %> is now at version <%= package.version %></title>
|
|
<description>The <%= package.name %> package in MELPA has been updated to version <%= package.version %>.</description>
|
|
<pubDate><%= package.build_time.rfc822 %></pubDate>
|
|
<guid isPermaLink="true"><%= package.url %></guid>
|
|
<link><%= package.info_url %></link>
|
|
</item>
|
|
<% end %>
|
|
</channel>
|
|
</rss>
|