diff options
-rwxr-xr-x | sources/projects/parse.rb | 14 | ||||
-rw-r--r-- | web/views/taginfo/project_error_log.erb | 3 | ||||
-rw-r--r-- | web/views/taginfo/projects.erb | 10 |
3 files changed, 19 insertions, 8 deletions
diff --git a/sources/projects/parse.rb b/sources/projects/parse.rb index 1dcbfda..7a0c270 100755 --- a/sources/projects/parse.rb +++ b/sources/projects/parse.rb @@ -52,7 +52,7 @@ projects.each do |id, json| end if data[:project] - p = data[:project] + p = data[:project].clone if ! p[:name] error_log += "ERROR: MISSING project.name\n" @@ -84,6 +84,18 @@ projects.each do |id, json| p[:contact_email], id ) + + p.delete(:name) + p.delete(:description) + p.delete(:project_url) + p.delete(:doc_url) + p.delete(:icon_url) + p.delete(:contact_name) + p.delete(:contact_email) + + p.each_key do |key| + error_log += "WARNING: project HAS UNKNOWN KEY '#{key}'\n" + end else error_log += "ERROR: MISSING project\n" end diff --git a/web/views/taginfo/project_error_log.erb b/web/views/taginfo/project_error_log.erb index 5417905..420f0cd 100644 --- a/web/views/taginfo/project_error_log.erb +++ b/web/views/taginfo/project_error_log.erb @@ -1,7 +1,8 @@ <div class="pre"> - <h1 class="section">Error log for project <%= h(@data['name']) %></h1> + <h1 class="section">Error log for project file</h1> </div> <div class="box"> + <h2><%= h(@data['name']) %></h2> <pre> <%= h(@data['error_log']) %> </pre> diff --git a/web/views/taginfo/projects.erb b/web/views/taginfo/projects.erb index d889aeb..6711f70 100644 --- a/web/views/taginfo/projects.erb +++ b/web/views/taginfo/projects.erb @@ -5,8 +5,8 @@ <th>Icon</th> <th>Project ID<br/>Project Name</th> <th>Fetch Date<br/>Updated</th><th>Code</th><th>Status</th> - <th>JSON URL<br/>Data URL</th><th>Fmt<br/>Vers</th> - <th>Project URL<br/>Doc URL</th><th>Contact</th> + <th>JSON URL<br/>Data URL<br/>Project URL<br/>Doc URL</th><th>Fmt<br/>Vers</th> + <th>Contact</th> <th>Description</th> </tr> <% @projects.each_with_index do |project, n| c = (n%2!=0) ? ' even' : '' %> @@ -31,13 +31,11 @@ </td> <td class="<%= c %> nowrap"> <a href="<%= h(project['json_url']) %>"><%= h(project['json_url']) %></a><br/> - <a href="<%= h(project['data_url']) %>"><%= h(project['data_url']) %></a> - </td> - <td class="tc<%= c %> nowrap"><%= h(project['data_format']) %></td> - <td class="<%= c %> nowrap"> + <a href="<%= h(project['data_url']) %>"><%= h(project['data_url']) %></a><br/> <a href="<%= h(project['project_url']) %>"><%= h(project['project_url']) %></a><br/> <a href="<%= h(project['doc_url']) %>"><%= h(project['doc_url']) %></a> </td> + <td class="tc<%= c %> nowrap"><%= h(project['data_format']) %></td> <td class="<%= c %> nowrap"><%= h(project['contact_name']) %><br/><%= h(project['contact_email']) %></td> <td class="<%= c %>"><%= h(project['description']) %></td> </tr> |