add download count to the melpa webpage

This commit is contained in:
Donald Curtis 2013-04-24 21:38:20 -05:00
parent e77648205e
commit c100cba4e8

View file

@ -4,10 +4,12 @@
include ERB::Util
archive_json = JSON.parse(File.open("../archive.json").read)
recipe_json = JSON.parse(File.open("../recipes.json").read)
downloads_json = JSON.parse(File.open("../download_counts.json").read)
packages = (archive_json.keys & recipe_json.keys).sort.map do |pkgname|
package = OpenStruct.new
package.name = pkgname
package.downloads = downloads_json[package.name]
versions, deps, package.descr, package.pkgtype = archive_json[package.name]
recipe = recipe_json[package.name]
package.version = versions.join('.')
@ -52,6 +54,9 @@
background-color: #FCF8E3;
color: #C09853;
}
.table .text-right {
text-align: right !important;
}
pre code { /* Match highlight.js styles to bootstrap */
padding: 0;
background: transparent;
@ -123,6 +128,7 @@
<th align="left">Description</th>
<th align="left">Recipe</th>
<th align="left">Source</th>
<th class="text-right" align="right"># DLs</th>
</tr>
</thead>
<tbody>
@ -138,6 +144,7 @@
<%=h package.source %>
<% end %>
</td>
<td class="text-right"><%=h package.downloads %></td>
</tr>
<% end %>
</tbody>