whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Ruby <ru...@apache.org>
Subject [whimsy.git] [1/1] Commit cafe5e3: track missing reports by month
Date Wed, 17 Feb 2016 12:20:59 GMT
Commit cafe5e3a1510766760124a46d1a84b028b4058d6:
    track missing reports by month


Branch: refs/heads/master
Author: Sam Ruby <rubys@intertwingly.net>
Committer: Sam Ruby <rubys@intertwingly.net>
Pusher: rubys <rubys@apache.org>

------------------------------------------------------------
www/board/missing-reports.cgi                                | ++++++++ 
------------------------------------------------------------
32 changes: 32 additions, 0 deletions.
------------------------------------------------------------


diff --git a/www/board/missing-reports.cgi b/www/board/missing-reports.cgi
new file mode 100755
index 0000000..55d20d0
--- /dev/null
+++ b/www/board/missing-reports.cgi
@@ -0,0 +1,32 @@
+#!/usr/bin/ruby1.9.1
+require 'whimsy/asf/agenda'
+
+records = 'http://www.apache.org/foundation/records/minutes/'
+
+Dir.chdir ASF::SVN['private/foundation/board']
+
+agendas = Dir['**/board_agenda_*'].sort_by {|name| File.basename(name)}[-12..-1]
+
+_html do
+  _h1 'Missing reports by month'
+
+  _table do
+    agendas.reverse.each do |agenda|
+      parsed = ASF::Board::Agenda.parse(File.read(agenda.untaint), true)
+
+      _tr_ do
+        _td parsed.count {|report| report["missing"]}, align: 'right'
+        _td do
+          if agenda.include? 'archived'
+            year = agenda[/\d+/]
+            minutes = File.basename(agenda).sub('agenda', 'minutes')
+            _a File.basename(agenda), href: "#{records}/#{year}/#{minutes}"
+          else
+            date = agenda[/\d+_\d+_\d+/].gsub('_', '-')
+            _a File.basename(agenda), href: "agenda/#{date}/"
+          end
+        end
+      end
+    end
+  end
+end

Mime
View raw message