mirror of
https://github.com/correl/melpa.git
synced 2024-12-19 19:14:23 +00:00
Show number of packages in archive on html page
This commit is contained in:
parent
58ef2b3055
commit
48bc01a6d9
1 changed files with 1 additions and 4 deletions
|
@ -10,8 +10,6 @@
|
|||
|
||||
**Last Update:** *<%= Time.now.strftime("%Y.%m.%d %H:%M %z") %>*
|
||||
|
||||
## Current List of Packages
|
||||
|
||||
<%
|
||||
def parse str
|
||||
# credit to: http://stackoverflow.com/q/3128406/154508
|
||||
|
@ -37,10 +35,8 @@
|
|||
|
||||
|
||||
headers = ["Package", "Version", "Description", "Source"]
|
||||
|
||||
data = parse(File.open("../packages/archive-contents").read)[1..-1]
|
||||
|
||||
|
||||
data.map! do |row|
|
||||
pkgname = row[0]
|
||||
pkgurl = "packages/#{row[0]}-#{row[1]}." + (row[-1] == "single" ? "el" : "tar")
|
||||
|
@ -61,6 +57,7 @@
|
|||
end
|
||||
end
|
||||
%>
|
||||
<%= "## Current List of #{data.size} Packages" %>
|
||||
<%=
|
||||
headers.to_enum(:each_with_index).map{
|
||||
|h,i| h + " "*(colwidth[i]-h.length) }.join(" ")
|
||||
|
|
Loading…
Reference in a new issue