This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push: new bf864c1 Add documentation bf864c1 is described below commit bf864c1b7f71493652e5fa907ffee3a4c5bb077e Author: Sebb <s...@apache.org> AuthorDate: Sun Apr 12 11:17:44 2020 +0100 Add documentation --- www/members/proxy.cgi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi index e019f1e..4229fb7 100755 --- a/www/members/proxy.cgi +++ b/www/members/proxy.cgi @@ -228,11 +228,18 @@ def emit_post(cur_mtg_dir, meeting) # update proxies file proxies = IO.read('proxies') + # look for lines containing '(id)' which start with 3 spaces + # TODO this assumes that the volunteer lines start with 2 spaces existing = proxies.scan(/ \S.*\(\S+\).*$/) + # extract the ids existing_ids = existing.map {|line| line[/\((\S+)\)/, 1] } + # keep only new ids added = list. reject {|line| existing_ids.include? line[/\((\S+)\)$/, 1]} list = added + existing + # look for the last '-' at the end of a line. + # This should be under the 'For:' column heading just before the proxies + # TODO it would be safer to look for <name> proxies[/.*-\n(.*)/m, 1] = list.flatten.sort.join("\n") + "\n" IO.write('proxies', proxies)