mirror of
https://github.com/correl/melpa.git
synced 2024-12-22 11:08:54 +00:00
Include only the most recent 100 items in the RSS feed.
With the full package list, updates.rss exceeds 512kb, which upsets dlvr.it.
This commit is contained in:
parent
6ac228aff4
commit
94a911a576
1 changed files with 4 additions and 1 deletions
|
@ -15,7 +15,7 @@
|
|||
require 'json'
|
||||
require 'time'
|
||||
require 'ostruct'
|
||||
JSON.parse(File.open("../archive.json").read).each do |pkgname, info|
|
||||
packages = JSON.parse(File.open("../archive.json").read).map do |pkgname, info|
|
||||
versions, deps, descr, pkgtype = info
|
||||
version = versions.join('.')
|
||||
package = OpenStruct.new
|
||||
|
@ -26,6 +26,9 @@
|
|||
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}"
|
||||
package
|
||||
end
|
||||
packages.sort_by { |p| p.version }.reverse[0..200].each do |package|
|
||||
%>
|
||||
<item>
|
||||
<title><%= package.name %> (<%= package.version %>) --- <%= ERB::Util.html_escape package.description %></title>
|
||||
|
|
Loading…
Reference in a new issue