mirror of
https://github.com/correl/melpa.git
synced 2024-12-22 19:17:27 +00:00
Add a "Source" column to the html package list, and link contents to the recipe files
This commit is contained in:
parent
d57589790f
commit
340e389a5d
1 changed files with 9 additions and 3 deletions
|
@ -38,17 +38,23 @@
|
|||
end
|
||||
|
||||
|
||||
headers = ["Package", "Version", "Description"]
|
||||
headers = ["Package", "Version", "Description", "Source"]
|
||||
|
||||
data = parse(File.open("../packages/archive-contents").read)[1..-1]
|
||||
|
||||
|
||||
data.map! do |row|
|
||||
[row[0], row[1][0], row[3..-2].join(" ")]
|
||||
pkgname = row[0]
|
||||
recipe_url = "https://github.com/milkypostman/melpa/blob/master/recipes/#{pkgname}"
|
||||
descr, source = row[3..-2].join(" "), "other"
|
||||
if descr =~ /(.*?)\s*\[source:\s*(\w+)\]\s*/
|
||||
descr, source = $1, $2
|
||||
end
|
||||
[pkgname, row[1][0], descr, "[#{source}](#{recipe_url})"]
|
||||
end
|
||||
data.sort!
|
||||
|
||||
colwidth = [0,0,0]
|
||||
colwidth = [0,0,0, 9]
|
||||
|
||||
data.map do |row|
|
||||
row.to_enum(:each_with_index).map do |e,i|
|
||||
|
|
Loading…
Reference in a new issue