Include HHMM in generated HTML and RSS, and make RSS item timestamps more precise

This commit is contained in:
Steve Purcell 2012-09-01 14:02:10 +01:00
parent efdbd825d5
commit 7e888980b9
2 changed files with 4 additions and 3 deletions

View file

@ -18,7 +18,7 @@
data = archive_json.keys.sort.map do |pkgname|
versions, deps, descr, pkgtype = archive_json[pkgname]
version = versions.max.to_s
version = versions.join('.')
pkgurl = "packages/#{pkgname}-#{version}." + (pkgtype == "single" ? "el" : "tar")
recipe_url = "https://github.com/milkypostman/melpa/blob/master/recipes/#{pkgname}"
source = 'unknown'

View file

@ -17,11 +17,12 @@
require 'ostruct'
JSON.parse(File.open("../archive.json").read).each do |pkgname, info|
versions, deps, descr, pkgtype = info
version = versions.max.to_s
version = versions.join('.')
package = OpenStruct.new
package.name = pkgname
package.version = version
package.build_time = Time.new(version[0..3].to_i, version[4..5].to_i, version[6..7].to_i)
hour_portion = sprintf("%04d", versions[1])
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}"
%>