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 5e34cb5: list date of addition
Date Mon, 22 Feb 2016 17:24:58 GMT
Commit 5e34cb5a3d48291a1de8b335ba67152e1b0a041a:
    list date of addition


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

------------------------------------------------------------
www/members/attendance-xcheck.cgi                            | +++++++++++++ ---
------------------------------------------------------------
30 changes: 25 additions, 5 deletions.
------------------------------------------------------------


diff --git a/www/members/attendance-xcheck.cgi b/www/members/attendance-xcheck.cgi
index 1010801..28cb07e 100755
--- a/www/members/attendance-xcheck.cgi
+++ b/www/members/attendance-xcheck.cgi
@@ -9,12 +9,23 @@ meetings = ASF::SVN['private/foundation/Meetings']
 json = JSON.parse(IO.read "#{meetings}/attendance.json")
 attend = json['matrix'].keys
 
+# parse received info
+added = Hash.new('unknown')
+Dir["#{meetings}/*/memapp-received.txt"].each do |received|
+  meeting = File.basename(File.dirname(received))
+  next if meeting.include? 'template'
+  text = File.read(received)
+  list = text.scan(/<(.*)@.*>.*Yes/i) + text.scan(/^(?:yes\s+)+(\w\S*)/)
+  list.flatten.each {|id| added[id] = meeting}
+end
+
 # cross check against members.txt
 missing = []
 ASF::Member.list.each do |id, info|
-  missing << info[:name] unless attend.delete info[:name] or info['status']
+  unless attend.delete info[:name] or info['status']
+    missing << [info[:name], added[id]] unless info[:name].empty?
+  end
 end
-missing.delete ''
 
 # produce HTML
 _html do
@@ -30,9 +41,18 @@ _html do
   
   _h2_ 'Listed in members.txt but not listed as attending a members meeting'
 
-  _ul do
-    missing.sort.each do |name|
-      _li name
+  _table do
+    _thead do
+      _th 'name'
+      _th 'date added as a member'
+    end
+
+    missing.sort.each do |name, meeting|
+      next if meeting =~ /^2015/
+      _tr_ do
+        _td name
+        _td meeting
+      end
     end
   end
 end

Mime
View raw message