You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2019/05/10 12:11:33 UTC
[whimsy] branch master updated (4187dd5 -> 22c67e2)
This is an automated email from the ASF dual-hosted git repository.
curcuru pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git.
from 4187dd5 whitelist Establish...Committee
new 60a0c61 Ensure output is sorted for later use
new 127817d Merge branch 'master' of https://github.com/apache/whimsy
new 22c67e2 Ow, my eyes! Add some style
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
tools/mboxhdr2csv.rb | 7 ++---
www/board/missing-reports.cgi | 72 +++++++++++++++++++++++++++++++------------
2 files changed, 55 insertions(+), 24 deletions(-)
[whimsy] 02/03: Merge branch 'master' of
https://github.com/apache/whimsy
Posted by cu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit 127817d56295a45cac71692dacd2f735941514ef
Merge: 60a0c61 4187dd5
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Fri May 10 07:19:43 2019 -0400
Merge branch 'master' of https://github.com/apache/whimsy
lib/whimsy/asf/agenda/special.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[whimsy] 01/03: Ensure output is sorted for later use
Posted by cu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit 60a0c61308c2c537e8a8c10b11adbeee9bb5dfb2
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Thu May 9 16:45:19 2019 -0400
Ensure output is sorted for later use
---
tools/mboxhdr2csv.rb | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/mboxhdr2csv.rb b/tools/mboxhdr2csv.rb
index 5675e35..358d963 100644
--- a/tools/mboxhdr2csv.rb
+++ b/tools/mboxhdr2csv.rb
@@ -257,7 +257,7 @@ end
# Side effect: writes out f.chomp(ext).json files
# @note writes string VERSION for differentiating from other *.json
def scan_dir_mbox2stats(dir, ext = MBOX_EXT)
- Dir["#{dir}/**/*#{ext}".untaint].each do |f|
+ Dir["#{dir}/**/*#{ext}".untaint].sort.each do |f|
mails, errs = mbox2stats(f.untaint)
File.open("#{f.chomp(ext)}.json", "w") do |fout|
fout.puts JSON.pretty_generate(["#{VERSION}", mails, errs])
@@ -269,11 +269,10 @@ end
# @return [ error1, error2, ...] if any errors
# Side effect: writes out dir/outname CSV file
# @note reads string VERSION for differentiating from other *.json
-def scan_dir_stats2csv(dir, outname)
+def scan_dir_stats2csv(dir, outname, ext = '.json')
errors = []
- filenames = Dir["#{dir}/**/*.json".untaint]
jzons = []
- filenames.each do |f|
+ Dir["#{dir}/**/*#{ext}".untaint].sort.each do |f|
begin
tmp = JSON.parse(File.read(f))
if tmp[0].kind_of?(String) && tmp[0].start_with?(VERSION)
[whimsy] 03/03: Ow, my eyes! Add some style
Posted by cu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
curcuru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
commit 22c67e28d4efcdfa4252a6bd0bd6c3d6636329c1
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Fri May 10 08:11:21 2019 -0400
Ow, my eyes! Add some style
---
www/board/missing-reports.cgi | 72 +++++++++++++++++++++++++++++++------------
1 file changed, 52 insertions(+), 20 deletions(-)
diff --git a/www/board/missing-reports.cgi b/www/board/missing-reports.cgi
index 28a6eea..97efe39 100755
--- a/www/board/missing-reports.cgi
+++ b/www/board/missing-reports.cgi
@@ -1,34 +1,66 @@
#!/usr/bin/env ruby
+PAGETITLE = "Missing Board Reports" # Wvisible:board
$LOAD_PATH.unshift '/srv/whimsy/lib'
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+require 'whimsy/asf'
require 'whimsy/asf/agenda'
-records = 'http://www.apache.org/foundation/records/minutes/'
+RECORDS = 'http://www.apache.org/foundation/records/minutes/'
-Dir.chdir ASF::SVN['foundation_board']
-
-agendas = Dir['**/board_agenda_*'].sort_by {|name| File.basename(name)}[-12..-1]
+# Produce HTML
_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}/"
+ _body? do
+ _whimsy_body(
+ title: PAGETITLE,
+ related: {
+ "/board/agenda" => "Current Month Board Agenda",
+ "/board/minutes" => "Past Minutes, Categorized",
+ "https://www.apache.org/foundation/board/calendar.html" => "Past Minutes, Dated",
+ "https://github.com/apache/whimsy/blob/master/www#{ENV['SCRIPT_NAME']}" => "See This Source Code"
+ },
+ helpblock: -> {
+ _p %{
+ This counts the number of expected reports to the board that were not timely submitted each month.
+ There are a variety of reasons this happens; often projects ask to report a month late if the chair is unavailable.
+ Note that the missing number for the current month is as of now; some projects report only a few days before the meeting.
+ }
+ }
+ ) do
+ _h1 'Missing Board Reports by Month'
+ Dir.chdir ASF::SVN['foundation_board']
+ agendas = Dir['**/board_agenda_*'].sort_by {|name| File.basename(name)}[-12..-1]
+ _table.table.table_hover.table_striped do
+ _thead_ do
+ _tr do
+ _th.col_md_1 '# Reports'
+ _th.col_md_1 '# Missing'
+ _th 'Board Minutes or Agenda'
+ end
+ end
+ _tbody do
+ agendas.reverse.each do |agenda|
+ parsed = ASF::Board::Agenda.parse(File.read(agenda.untaint), true)
+ _tr_ do
+ _td parsed.count, align: 'right'
+ _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
end
end
end
+