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 2017/04/28 14:47:27 UTC

[whimsy] branch master updated: Move conferences related tools to /events

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

The following commit(s) were added to refs/heads/master by this push:
       new  049832e   Move conferences related tools to /events
049832e is described below

commit 049832e7aed6aa635db31386d638a3a9d212e41d
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Fri Apr 28 10:47:23 2017 -0400

    Move conferences related tools to /events
---
 www/events/assets/bootstrap-min.css  |   6 ++
 www/events/assets/bootstrap-min.js   |   7 +++
 www/events/assets/jquery-min.js      |   4 ++
 www/events/assets/stupidtable.min.js |   1 +
 www/events/other.cgi                 | 117 +++++++++++++++++++++++++++++++++++
 www/events/past.cgi                  |  56 +++++++++++++++++
 6 files changed, 191 insertions(+)

diff --git a/www/events/assets/bootstrap-min.css b/www/events/assets/bootstrap-min.css
new file mode 100644
index 0000000..4cf729e
--- /dev/null
+++ b/www/events/assets/bootstrap-min.css
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr [...]
+/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/www/events/assets/bootstrap-min.js b/www/events/assets/bootstrap-min.js
new file mode 100644
index 0000000..e79c065
--- /dev/null
+++ b/www/events/assets/bootstrap-min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:" [...]
+d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data()) [...]
\ No newline at end of file
diff --git a/www/events/assets/jquery-min.js b/www/events/assets/jquery-min.js
new file mode 100644
index 0000000..e6a051d
--- /dev/null
+++ b/www/events/assets/jquery-min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.2",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b [...]
+return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}fu [...]
+}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=( [...]
diff --git a/www/events/assets/stupidtable.min.js b/www/events/assets/stupidtable.min.js
new file mode 100644
index 0000000..fa3cdd5
--- /dev/null
+++ b/www/events/assets/stupidtable.min.js
@@ -0,0 +1 @@
+(function(d){d.fn.stupidtable=function(b){return this.each(function(){var a=d(this);b=b||{};b=d.extend({},d.fn.stupidtable.default_sort_fns,b);var n=function(a,b){for(var f=[],c=0,e=a.slice(0).sort(b),h=0;h<a.length;h++){for(c=d.inArray(a[h],e);-1!=d.inArray(c,f);)c++;f.push(c)}return f},q=function(a,b){for(var d=a.slice(0),c=0,e=0;e<b.length;e++)c=b[e],d[c]=a[e];return d};a.on("click","th",function(){var m=a.children("tbody").children("tr"),g=d(this),f=0,c=d.fn.stupidtable.dir;a.find("t [...]
diff --git a/www/events/other.cgi b/www/events/other.cgi
new file mode 100755
index 0000000..f07856d
--- /dev/null
+++ b/www/events/other.cgi
@@ -0,0 +1,117 @@
+#!/usr/bin/env ruby
+PAGETITLE = 'Other FOSS Conference Listings' # Wvisible:events
+
+$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
+require 'json'
+require 'net/http'
+require 'whimsy/asf'
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+require 'wunderbar/jquery/stupidtable'
+require 'date'
+
+# TODO format change coming: https://github.com/afilina/dev-community-data/issues/90 
+conflist = JSON.parse(Net::HTTP.get(URI('https://raw.githubusercontent.com/afilina/dev-community-data/master/data/conferences.json')))
+SPEAKERKIT = 'speaker_kit'
+cols = {
+  'ticket_included' => 'Speaker Pass',
+  'hotel_included' => 'Speaker Hotel',
+  'travel_included' => 'Speaker Travel'
+}
+
+counts = cols.keys.map do |field|
+  matches = conflist.select do |conf|
+    conf[SPEAKERKIT] && conf[SPEAKERKIT][field]
+  end
+  
+  [field, matches.count]
+end
+counts = counts.to_h
+
+_html do
+  _body? do
+    _whimsy_header PAGETITLE
+    _whimsy_content do
+      _div.row do
+        _div.col_sm_10 do
+          _div.panel.panel_primary do
+            _div.panel_heading {_h3.panel_title PAGETITLE}
+            _div.panel_body do
+              _ "Listing #{conflist.count} self-reported FOSS Conferences and their claimed speaker support status.  Data from "
+              _a_ 'afilina/dev-community-data', href: 'https://github.com/afilina/dev-community-data/'
+              _ ', calendar website at '
+              _a_ 'ConFoo Community', href: 'https://community.confoo.ca/'
+              _ '.  Click to sort table.  "False" propercase entries are when conference doesn\'t report any speaker reimbursement details.'
+              _br
+              _p 'Conferences that include speaker benefit types:' 
+              _ul do
+                counts.each do |s, num|
+                  _li "#{cols[s]}: #{num}"
+                end
+              end  
+            end
+          end
+        end
+      end
+      _div.row do
+        _table.table.table_hover.table_striped do
+          _thead_ do
+            _tr do
+              _th 'Conference', data_sort: 'string'
+              cols.each do |id, desc|
+                _th! desc, data_sort: 'string'
+              end
+              _th 'Last Event', data_sort: 'string'
+              _th 'Twitter'
+            end
+            _tbody do
+              conflist.each do | conf |
+                _tr_ do
+                  _td do 
+                    _a conf['name'], href: conf['website']
+                  end
+                  if conf[SPEAKERKIT] then
+                    cols.each do |id, desc|
+                      _td! conf[SPEAKERKIT][id]
+                    end            
+                  else
+                    _td 'False'
+                    _td 'False'
+                    _td 'False'
+                  end
+                  if conf['events'] then
+                    laste = conf['events'].max_by {|e| Date.parse(e['event_end'])}
+                    _td laste['event_end']
+                  else
+                    _td conf['last_event']
+                  end
+                  _td do 
+                    _a conf['twitter'], href: conf['twitter']
+                  end
+                end
+              end
+            end
+          end
+        end
+        
+        _script %{
+          var table = $(".table").stupidtable();
+          table.on("aftertablesort", function (event, data) {
+            var th = $(this).find("th");
+            th.find(".arrow").remove();
+            var dir = $.fn.stupidtable.dir;
+            var arrow = data.direction === dir.ASC ? "&uarr;" : "&darr;";
+            th.eq(data.column).append('<span class="arrow">' + arrow +'</span>');
+            });
+          }
+        _whimsy_footer({
+          "https://github.com/afilina/dev-community-data" => "FOSS conference listing - ConFoo",
+          "https://github.com/szabgab/codeandtalk.com" => "FOSS conference listing - CodeAndTalk",
+          "https://www.apache.org/foundation/marks/resources" => "Trademark Site Map",
+          "https://www.apache.org/foundation/marks/list/" => "Official Apache Trademark List"
+        })
+      end
+    end
+  end
+end
+    
\ No newline at end of file
diff --git a/www/events/past.cgi b/www/events/past.cgi
new file mode 100755
index 0000000..6cd32c0
--- /dev/null
+++ b/www/events/past.cgi
@@ -0,0 +1,56 @@
+#!/usr/bin/env ruby
+PAGETITLE = 'ApacheCon Historical Listing' # Wvisible:apachecon
+
+$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
+require 'csv'
+require 'json'
+require 'whimsy/asf'
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+
+ifields = {
+  'SessionList'	=> ['glyphicon_th_list', 'Session Listing'],
+  'SlideArchive' => ['glyphicon_file', 'Session Listing'],
+  'VideoArchive' => ['glyphicon_facetime_video', 'Session Listing'],
+  'AudioArchive' => ['glyphicon_headphones', 'Session Listing'],
+  'PhotoAlbum' => ['glyphicon_camera', 'Session Listing']
+}
+
+_html do
+  _body? do
+    _whimsy_header PAGETITLE
+    ac_dir = ASF::SVN['private/foundation/ApacheCon']
+    history = File.read("#{ac_dir}/apacheconhistory.csv")
+    history.sub! "\uFEFF", '' # remove Zero Width No-Break Space
+    csv = CSV.parse(history, headers:true)
+    _whimsy_content do
+      _p do
+        _ 'ApacheCon is the official conference of the ASF, and the next '
+        _a 'ApacheCon is in Miami, May 2017!', href: 'http://events.linuxfoundation.org/events/apachecon-north-america/'
+      end 
+      _p 'ApacheCon has been going on since before the ASF was born, and includes great events:'
+      _ul do
+        csv.each do |r|
+          _li do
+            _a r['Name'], href: r['Link']
+            _ ", was held in #{r['Location']}. "
+            _br
+            ifields.each do |fn, g|
+              if r[fn] then
+                _a! href: r[fn] do
+                  _span!.glyphicon class: "#{g[0]}"
+                  _! ' ' + g[1]
+                end
+              end
+            end
+          end
+        end        
+      end
+    end
+    
+    _whimsy_footer({
+      "https://www.apache.org/foundation/marks/resources" => "Trademark Site Map",
+      "https://www.apache.org/foundation/marks/list/" => "Official Apache Trademark List"
+      })
+  end
+end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].