Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minutes pages to Jekyll build process, based on meeting-minutes service #1119

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[submodule "_external/data"]
path = _external/data
url = https://github.com/w3c/wai-website-data.git
branch = master
branch = kgf-minutes
[submodule "_external/resources/wcag-act-rules"]
path = _external/resources/wcag-act-rules
url = https://github.com/w3c/wcag-act-rules.git
Expand Down
17 changes: 17 additions & 0 deletions _data/minutes/groups.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"gl": ["ag", "wai-wcag"],
"coga": ["coga"],
"conformance-testing": ["wcag-act"],
"low-vision-a11y-tf": ["low-vision", "lvtf"],
"matf": ["mobile-a11y", "matf"],
"wcag2ict": ["wcag2ict"],
"apa": ["apa", "pf", "pf-ftf"],
"adapt": ["adapt", "personalization"],
"fast": ["fast"],
"maturity-model": ["maturity"],
"research-questions": ["rqtf"],
"spoken-presentation": ["pronunciation"],
"aria": ["aria", "aria-dive"],
"pdf-aam": ["pdf-aam"],
"practices": ["aria-apg"]
}
31 changes: 31 additions & 0 deletions _includes/minutes/minutes.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{% comment %}
IMPORTANT: When including within .md files, surround with {::nomarkdown}...{:/}

Inputs:
- group - group ID (i.e. a top-level key in _data/minutes/groups.json)
{% endcomment %}

<p>
<a href="./" aria-current="page">Minutes</a> |
<a href="topics/">Topics</a> |
<a href="resolutions/">Resolutions</a>
</p>

{%- assign current_year = 0 -%}
{% for minutes in site.data.minutes[include.group] %}
{%- capture date %}{{ minutes[0] | truncate: 10, "" }}{% endcapture -%}
{%- capture year %}{{ date | truncate: 4, "" }}{% endcapture -%}
{%- capture channel %}{{ minutes[0] | replace_first: date, "" | replace_first: "-", "" }}{% endcapture -%}
{% if year != current_year %}
{%- if current_year != 0 %}</ul></section>{% endif %}
{%- assign current_year = year -%}
<section id="minutes-{{ current_year }}">
<h2>{{ current_year }}</h2>
<ul>
{% endif %}
<li><a href="{{ minutes[1].href }}">{{ date | date: "%e %B" }}: {{ minutes[1].title }}</a></li>
{% endfor %}
{% if current_year != 0 %}
</ul>
</section>
{% endif %}
51 changes: 51 additions & 0 deletions _includes/minutes/resolutions.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{% comment %}
IMPORTANT: When including within .md files, surround with {::nomarkdown}...{:/}

Inputs:
- group - group ID (i.e. a top-level key in _data/minutes/groups.json)
{% endcomment %}

<p>
<a href="../">Minutes</a> |
<a href="../topics/">Topics</a> |
<a href="./" aria-current="page">Resolutions</a>
</p>

<p>
Resolutions reflect general consensus of participants present in a meeting.
They are not formal decisions of the group. Refer to the
<a href="/WAI/GL/wiki/Decisions">Decisions</a> page for formal decisions.
Context for each resolution is available via its link into the minutes.
</p>

{%- assign current_year = 0 -%}
{% for minutes in site.data.minutes[include.group] %}
{%- unless minutes[1].resolutions.size %}{% continue %}{% endunless -%}
{%- capture date %}{{ minutes[0] | truncate: 10, "" }}{% endcapture -%}
{%- capture year %}{{ date | truncate: 4, "" }}{% endcapture -%}
{%- capture channel %}{{ minutes[0] | replace_first: date, "" | replace_first: "-", "" }}{% endcapture -%}
{% if year != current_year %}
{%- if current_year != 0 %}</ul></section>{% endif %}
{%- assign current_year = year -%}
<section id="minutes-{{ current_year }}">
<h2>{{ current_year }}</h2>
<ul>
{% endif %}
<li>
<a href="{{ minutes[1].href }}">{{ date | date: "%e %B" }}: {{ minutes[1].title }}</a>
<ul>
{% for resolution in minutes[1].resolutions %}
<li>
{% if resolution.topic %}{{ resolution.topic }} - {% endif -%}
<a href="{{ minutes[1].href }}#{{ resolution.id }}">
{{- resolution.content -}}
</a>
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
{% if current_year != 0 %}
</ul>
</section>
{% endif %}
40 changes: 40 additions & 0 deletions _includes/minutes/topics.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{% comment %}
IMPORTANT: When including within .md files, surround with {::nomarkdown}...{:/}
Inputs:
- group - group ID (i.e. a top-level key in _data/minutes/groups.json)
{% endcomment %}

<p>
<a href="../">Minutes</a> |
<a href="./" aria-current="page">Topics</a> |
<a href="../resolutions/">Resolutions</a>
</p>

{%- assign current_year = 0 -%}
{% for minutes in site.data.minutes[include.group] %}
{%- capture date %}{{ minutes[0] | truncate: 10, "" }}{% endcapture -%}
{%- capture year %}{{ date | truncate: 4, "" }}{% endcapture -%}
{%- capture channel %}{{ minutes[0] | replace_first: date, "" | replace_first: "-", "" }}{% endcapture -%}
{% if year != current_year %}
{%- if current_year != 0 %}</ul></section>{% endif %}
{%- assign current_year = year -%}
<section id="minutes-{{ current_year }}">
<h2>{{ current_year }}</h2>
<ul>
{% endif %}
<li>
<a href="{{ minutes[1].href }}">{{ date | date: "%e %B" }}: {{ minutes[1].title }}</a>
{%- if minutes[1].topics.size -%}
<ul>
{%- for topic in minutes[1].topics %}
<li><a href="{{ topic.href }}">{{ topic.title }}</a></li>
{%- endfor -%}
</ul>
{%- endif %}
</li>
{% endfor %}
{% if current_year != 0 %}
</ul>
</section>
{% endif %}
57 changes: 57 additions & 0 deletions _plugins/minutes-plugin.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
require 'json'
require 'net/http'
require 'uri'

module Jekyll
class MinutesFetcher < Generator
def generate(site)
start_time = Time.now
limit = 10000
requested_channels = []
site.data['minutes']['groups'].each {|id, channels| requested_channels.push(*channels)}

minutesUri =
URI("https://www.w3.org/services/meeting-minutes?format=json&num=#{limit}&channels=#{requested_channels.uniq().join(',')}")
data = JSON.parse(Net::HTTP.get(minutesUri))
grouped_data = {}
data.each do |entry|
entry['topics'].select! {|topic| topic['title'] != nil}
entry['topics'].each do |topic|
topic['title'].encode!('UTF-8', invalid: :replace, replace: '')
end
if (entry['resolutions'])
entry['resolutions'].each do |resolution|
resolution['topic'].encode!('UTF-8', invalid: :replace, replace: '') if resolution['topic']
end
end
grouped_data[entry['channel']] = {} unless grouped_data[entry['channel']]
grouped_data[entry['channel']]["#{entry['yyyy']}-#{entry['mm']}-#{entry['dd']}"] = {
'href' => entry['href'].sub(/^http:/, 'https:'),
# Perl script reads <title> which includes date at end, which we don't want in title
'title' => entry['title'].sub(/\s*\S+\s+\d\d?\s+\w+\s+\d{4}$/, ''),
'resolutions' => entry['resolutions'],
'topics' => entry['topics']
}
end

site.data['minutes']['groups'].each do |id, channels|
groupMinutes = []
for channel in channels do
next unless grouped_data[channel]
grouped_data[channel].each do |date, details|
groupMinutes.push(details.merge({channel_id: channel, date: date}))
end
end
groupMinutes.sort_by! {|details| Date.parse(details[:date])}
groupMinutes.reverse!

site.data['minutes'][id] = {}
for details in groupMinutes do
site.data['minutes'][id][details[:date] + '-' + details[:channel_id]] =
details.except(:channel_id, :date)
end
end
$stdout.puts('Fetched meeting minutes data in ' + (Time.now - start_time).to_s + ' seconds')
end
end
end
2 changes: 1 addition & 1 deletion pages/about/groups/agwg.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ See [Instructions for joining the Accessibility Guidelines Working Group](https:
## Communications and decisions

* [Calendar of meetings](https://www.w3.org/groups/wg/ag/calendar/)
* [Minutes from previous meetings](https://www.w3.org/WAI/GL/minutes-history)
* [Minutes from previous meetings](/about/groups/agwg/minutes/)
* [Mailing list archive](https://lists.w3.org/Archives/Public/w3c-wai-gl/)
* [Record of decisions](https://www.w3.org/WAI/GL/wiki/Decisions)
* [Decision policy](/about/groups/agwg/decision-policy/)
Expand Down
15 changes: 15 additions & 0 deletions pages/about/groups/agwg/minutes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Accessibility Guidelines Working Group Meeting Minutes
nav_title: Meeting Minutes
lang: en
permalink: /about/groups/agwg/minutes/
ref: /about/groups/agwg/minutes/
github:
label: wai-groups
---

This page shows minutes of the Accessibility Guidelines Working Group. Minutes for task forces are available from their respective pages.

{::nomarkdown}
{% include minutes/minutes.liquid group="gl" %}
{:/}
15 changes: 15 additions & 0 deletions pages/about/groups/agwg/minutes/resolutions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Accessibility Guidelines Working Group Meeting Resolutions
nav_title: Meeting Resolutions
lang: en
permalink: /about/groups/agwg/minutes/resolutions/
ref: /about/groups/agwg/minutes/resolutions/
github:
label: wai-groups
---

This page shows minutes of the Accessibility Guidelines Working Group. Minutes for task forces are available from their respective pages.

{::nomarkdown}
{% include minutes/resolutions.liquid group="gl" %}
{:/}
15 changes: 15 additions & 0 deletions pages/about/groups/agwg/minutes/topics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Accessibility Guidelines Working Group Meeting Topics
nav_title: Meeting Topics
lang: en
permalink: /about/groups/agwg/minutes/topics/
ref: /about/groups/agwg/minutes/topics/
github:
label: wai-groups
---

This page shows minutes of the Accessibility Guidelines Working Group. Minutes for task forces are available from their respective pages.

{::nomarkdown}
{% include minutes/topics.liquid group="gl" %}
{:/}
2 changes: 1 addition & 1 deletion pages/about/groups/apawg.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ See [Instructions for joining the Accessible Platform Architectures Working Grou
## Communications and decisions

* [Calendar of meetings](https://www.w3.org/groups/wg/apa/calendar/)
* [Minutes from previous meetings](https://www.w3.org/WAI/APA/minutes)
* [Minutes from previous meetings](/about/groups/apawg/minutes/)
* [Mailing list archive](https://lists.w3.org/Archives/Public/public-apa/)
* [Record of decisions](https://www.w3.org/WAI/APA/wiki/Decisions)
* [Decision policy](/about/groups/apawg/decision-policy/)
Expand Down
13 changes: 13 additions & 0 deletions pages/about/groups/apawg/minutes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Accessible Platform Architectures Working Group Meeting Minutes
nav_title: Meeting Minutes
lang: en
permalink: /about/groups/apawg/minutes/
ref: /about/groups/apawg/minutes/
github:
label: wai-groups
---

{::nomarkdown}
{% include minutes/minutes.liquid group="apa" %}
{:/}
13 changes: 13 additions & 0 deletions pages/about/groups/apawg/minutes/resolutions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Accessible Platform Architectures Working Group Meeting Resolutions
nav_title: Meeting Resolutions
lang: en
permalink: /about/groups/apawg/minutes/resolutions/
ref: /about/groups/apawg/minutes/resolutions/
github:
label: wai-groups
---

{::nomarkdown}
{% include minutes/resolutions.liquid group="apa" %}
{:/}
13 changes: 13 additions & 0 deletions pages/about/groups/apawg/minutes/topics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Accessible Platform Architectures Working Group Meeting Topics
nav_title: Meeting Topics
lang: en
permalink: /about/groups/apawg/minutes/topics/
ref: /about/groups/apawg/minutes/topics/
github:
label: wai-groups
---

{::nomarkdown}
{% include minutes/topics.liquid group="apa" %}
{:/}
2 changes: 1 addition & 1 deletion pages/about/groups/ariawg.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ See [Instructions for joining the Accessible Rich Internet Applications Working
## Communications and decisions

* [Calendar of meetings](https://www.w3.org/groups/wg/aria/calendar/)
* [Minutes from previous meetings](https://www.w3.org/WAI/ARIA/minutes)
* [Minutes from previous meetings](/about/groups/ariawg/minutes/)
* [Mailing list archive](https://lists.w3.org/Archives/Public/public-aria/)
* Record of decisions (mainly in GitHub pull request reviews)
* [Decision policy](/about/groups/ariawg/decision-policy/)
Expand Down
13 changes: 13 additions & 0 deletions pages/about/groups/ariawg/minutes/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: ARIA Working Group Meeting Minutes
nav_title: Meeting Minutes
lang: en
permalink: /about/groups/ariawg/minutes/
ref: /about/groups/ariawg/minutes/
github:
label: wai-groups
---

{::nomarkdown}
{% include minutes/minutes.liquid group="aria" %}
{:/}
13 changes: 13 additions & 0 deletions pages/about/groups/ariawg/minutes/resolutions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: ARIA Working Group Meeting Resolutions
nav_title: Meeting Resolutions
lang: en
permalink: /about/groups/ariawg/minutes/resolutions/
ref: /about/groups/ariawg/minutes/resolutions/
github:
label: wai-groups
---

{::nomarkdown}
{% include minutes/resolutions.liquid group="aria" %}
{:/}
13 changes: 13 additions & 0 deletions pages/about/groups/ariawg/minutes/topics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: ARIA Working Group Meeting Topics
nav_title: Meeting Topics
lang: en
permalink: /about/groups/ariawg/minutes/topics/
ref: /about/groups/ariawg/minutes/topics/
github:
label: wai-groups
---

{::nomarkdown}
{% include minutes/topics.liquid group="aria" %}
{:/}
2 changes: 1 addition & 1 deletion pages/about/groups/task-forces/adapt.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Once you are a member of the APA Working Group, email the [W3C staff contact for
## Communications

* [Calendar of meetings](https://www.w3.org/groups/tf/personalization-tf/calendar/)
* [Minutes from previous meetings](https://www.w3.org/WAI/APA/task-forces/adapt/minutes)
* [Minutes from previous meetings](/about/groups/task-forces/adapt/minutes/)
* [Mailing list archive](https://lists.w3.org/Archives/Public/public-adapt/)

## Publications
Expand Down
Loading