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/22 14:33:19 UTC
[whimsy] branch master updated: Visualization for other FOSS
conference data
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 6d88d61 Visualization for other FOSS conference data
6d88d61 is described below
commit 6d88d61af88c49eb0db0f597e35ae47c25db763d
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Sat Apr 22 10:33:14 2017 -0400
Visualization for other FOSS conference data
---
www/test/conferences.cgi | 101 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 101 insertions(+)
diff --git a/www/test/conferences.cgi b/www/test/conferences.cgi
new file mode 100755
index 0000000..5efca1e
--- /dev/null
+++ b/www/test/conferences.cgi
@@ -0,0 +1,101 @@
+#!/usr/bin/env ruby
+$LOAD_PATH.unshift File.realpath(File.expand_path('../../../lib', __FILE__))
+require 'json'
+require 'net/http'
+require 'wunderbar'
+require 'wunderbar/bootstrap'
+require 'wunderbar/jquery/stupidtable'
+require 'whimsy/asf/themes'
+
+PAGETITLE = 'FOSS Conference Listings'
+
+_html do
+ _body? do
+ _whimsy_header PAGETITLE
+
+ conflist = JSON.parse(Net::HTTP.get(URI('https://raw.githubusercontent.com/afilina/dev-community-data/master/data/conferences.json')))
+ _whimsy_content do
+ _div.row do
+ _div.col_sm_10 do
+ _div.panel.panel_primary do
+ _div.panel_heading {_h3.panel_title 'FOSS Conference Listings'}
+ _div.panel_body do
+ _ 'Listing various 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.'
+ end
+ end
+ end
+ end
+ ct, ticket, hotel, travel = 0, 0, 0, 0
+ _div.row do
+ _table.table.table_hover do
+ _thead_ do
+ _tr do
+ _th 'Conference', data_sort: 'string'
+ _th 'Speaker Pass', data_sort: 'string'
+ _th 'Speaker Hotel', data_sort: 'string'
+ _th 'Speaker Travel', data_sort: 'string'
+ _th 'Last Event', data_sort: 'string'
+ _th 'Twitter'
+ end
+ end
+ _tbody do
+ conflist.each do | conf |
+ ct += 1
+ _tr_ do
+ _td do
+ _a conf['name'], href: conf['website']
+ end
+ if conf['speaker_kit'] then
+ if conf['speaker_kit']['ticket_included'] then
+ ticket += 1
+ end
+ if conf['speaker_kit']['hotel_included'] then
+ hotel += 1
+ end
+ if conf['speaker_kit']['travel_included'] then
+ travel += 1
+ end
+ _td conf['speaker_kit']['ticket_included']
+ _td conf['speaker_kit']['hotel_included']
+ _td conf['speaker_kit']['travel_included']
+ else
+ _td 'False'
+ _td 'False'
+ _td 'False'
+ end
+ _td conf['last_event']
+ _td do
+ _a conf['twitter'], href: conf['twitter']
+ end
+ end
+ end
+ end
+ end
+ end
+ _p.count do
+ _b "Out of total: #{ct} conferences"
+ _ ", ones that cover ticket: #{ticket}, hotel: #{hotel}, travel: #{travel}."
+ 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 ? "↑" : "↓";
+ th.eq(data.column).append('<span class="arrow">' + arrow +'</span>');
+ });
+ }
+ _whimsy_footer({
+ "https://github.com/afilina/dev-community-data" => "FOSS conference listing",
+ "https://www.apache.org/foundation/marks/resources" => "Trademark Site Map",
+ "https://www.apache.org/foundation/marks/list/" => "Official Apache Trademark List"
+ })
+ end
+ end
+end
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].