imfreedom/www.imfreedom.org
Merged in qulogic/www.imfreedom.org (pull request #9)
Simplify meeting list generation
--- a/README.md Wed Jun 19 01:56:32 2019 -0400
+++ b/README.md Fri Jun 21 17:04:35 2019 +0000
@@ -1,2 +1,26 @@
+## Adding meeting minutes +Minutes should be stored in `hugo/content/minutes/<UTC date>.md`. You can use +`hugo` to create it using a provided archetype: +$ hugo -s hugo new content/minutes/2019-06-18.md +which will fill out the following front matter: +title: "Minutes for the <UTC date> Board Meeting" + - "https://data.imfreedom.org/public/board-meetings/audio-<UTC date>.ogg" + - "https://data.imfreedom.org/public/board-meetings/video-<UTC date>.mp4" +You may specify multiple audio or video links (or none and leave out the key). +To add a transcript, place the content in a corresponding file named +`hugo/content/transcripts/<UTC date>.md`. It must match the filename of a +minutes file. If you have no minutes, then still add the minutes file with +`unlisted:true` in its front matter. --- a/data/meetings.json Wed Jun 19 01:56:32 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20190611.ogg"
- "mpeg4": "https://data.imfreedom.org/public/board-meetings/video-20190611.mp4"
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20180503.ogg"
- "mpeg4": "https://data.imfreedom.org/public/board-meetings/video-20180503.mp4"
- "note": "no transcript or recordings"
- "note": "no transcript or recordings"
- "note": "no transcript or recordings"
- "note": "no transcript or recordings"
- "note": "no transcript or recordings"
- "note": "no minutes or recordings"
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20130415.ogg"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/archetypes/minutes.md Fri Jun 21 17:04:35 2019 +0000
@@ -0,0 +1,10 @@
+title: "Minutes for the {{ .Name }} Board Meeting" + - "https://data.imfreedom.org/public/board-meetings/audio-{{ replace .Name "-" "" }}.ogg" + - "https://data.imfreedom.org/public/board-meetings/video-{{ replace .Name "-" "" }}.mp4" +IM Freedom Board Meeting {{ .Name }} 00:00 UTC --- a/hugo/content/_index.md Wed Jun 19 01:56:32 2019 -0400
+++ b/hugo/content/_index.md Fri Jun 21 17:04:35 2019 +0000
@@ -28,8 +28,6 @@
member directly or through open discussion in
[discussion@conference.pidgin.im](xmpp:discussion@conference.pidgin.im?join).
https://apps.irs.gov/app/eos/displayAll.do?dispatchMethod=displayAllInfo&Id=3819004&ein=593837808
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/content/minutes/2009-11-23.md Fri Jun 21 17:04:35 2019 +0000
@@ -0,0 +1,8 @@
+title: "Minutes for the 2009-11-23 Board Meeting" +There are no minutes for the 2009-11-23 Board Meeting. Please review the +[transcript]({{< ref "/transcripts/2009-11-23" >}}) instead. --- a/hugo/content/minutes/2013-04-15.md Wed Jun 19 01:56:32 2019 -0400
+++ b/hugo/content/minutes/2013-04-15.md Fri Jun 21 17:04:35 2019 +0000
@@ -1,6 +1,8 @@
title: "Minutes for the 2013-04-15 Board Meeting"
+ - "https://data.imfreedom.org/public/board-meetings/audio-20130415.ogg" The 2013 Board Meeting was held at 22:30 UTC on 2013-04-15 via conference call using the service [Rondee](http://www.rondee.com/).
@@ -57,4 +59,4 @@
Ethan motioned to pre-approve the renewal fee with Delaware. This was 170.00 last year. This motion was passed unanimously.
-Meeting adjourned at 18:49.
\ No newline at end of file
+Meeting adjourned at 18:49. --- a/hugo/content/minutes/2018-05-03.md Wed Jun 19 01:56:32 2019 -0400
+++ b/hugo/content/minutes/2018-05-03.md Fri Jun 21 17:04:35 2019 +0000
@@ -1,6 +1,10 @@
title: "Minutes for the 2018-05-03 Board Meeting"
+ - "https://data.imfreedom.org/public/board-meetings/audio-20180503.ogg" + - "https://data.imfreedom.org/public/board-meetings/video-20180503.mp4" IM Freedom Board Meeting 2018-05-03 01:30 UTC using a Zoom.us. All times listed below in UTC.
--- a/hugo/content/minutes/2019-06-11.md Wed Jun 19 01:56:32 2019 -0400
+++ b/hugo/content/minutes/2019-06-11.md Fri Jun 21 17:04:35 2019 +0000
@@ -1,6 +1,10 @@
title: "Minutes for the 2019-06-11 Board Meeting"
+ - "https://data.imfreedom.org/public/board-meetings/audio-20190611.ogg" + - "https://data.imfreedom.org/public/board-meetings/video-20190611.mp4" IM Freedom Board Meeting 2019-06-11 00:00 UTC using a Zoom.us. All times listed below in UTC.
--- a/hugo/data/meetings.json Wed Jun 19 01:56:32 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20190611.ogg"
- "mpeg4": "https://data.imfreedom.org/public/board-meetings/video-20190611.mp4"
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20180503.ogg"
- "mpeg4": "https://data.imfreedom.org/public/board-meetings/video-20180503.mp4"
- "note": "no transcript or recordings",
- "note": "no transcript or recordings",
- "note": "no transcript or recordings",
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20130415.ogg"
- "note": "no transcript or recordings",
- "note": "no transcript or recordings",
- "note": "no minutes or recordings",
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/home.html Fri Jun 21 17:04:35 2019 +0000
@@ -0,0 +1,4 @@
+{{ partial "minutes-list" (.GetPage "minutes") }} --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/partials/minutes-list.html Fri Jun 21 17:04:35 2019 +0000
@@ -0,0 +1,41 @@
+ {{ $transcript := .Site.GetPage (path.Join "transcripts" .File.BaseFileName) }} + <td>{{ .Date.Format "2006-01-02" }}</td> + {{ if not (.Param "unlisted") }} + <a href="{{ .Permalink }}">minutes</a> + <a href="{{ .Permalink }}">transcript</a> + {{ range .Param "audio" }} + <a href="{{ . }}" target="_blank"> + audio ({{ path.Ext . }}) + <i class="fas fa-external-link-alt fa-sm"></i> + {{ range .Param "videos" }} + <a href="{{ . }}" target="_blank"> + video ({{ path.Ext . }}) + <i class="fas fa-external-link-alt fa-sm"></i> + {{ if and (not $transcript) (not (.Param "audio")) (not (.Param "videos")) }} + <div>no transcript or recordings</div> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hugo/layouts/section/minutes.html Fri Jun 21 17:04:35 2019 +0000
@@ -0,0 +1,5 @@
+ {{ partial "minutes-list.html" . }} --- a/hugo/layouts/shortcodes/meetings.html Wed Jun 19 01:56:32 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
- {{ range .Site.Data.meetings }}
- {{ if isset . "minutes" }}
- <a href="/minutes/{{ .key }}">minutes</a>
- {{ if isset . "transcripts" }}
- <a href="/transcripts/{{ .key }}">transcript</a>
- {{ if isset . "audio" }}
- <a href="{{ .audio.ogg }}" target="_blank">
- <i class="fas fa-external-link-alt fa-sm"></i>
- {{ if isset . "video" }}
- <a href="{{ .video.mpeg4 }}" target="_blank">
- <i class="fas fa-external-link-alt fa-sm"></i>
- {{ if isset . "note" }}
--- a/tools/populate-meetings-data.js Wed Jun 19 01:56:32 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
- * Creates meetings data for hugo to consume
- * * hugo/content/mintues/*
- * * hugo/content/transcripts/*
-const fs = require('fs')
-const path = require('path')
-const meetingsData = require('../data/meetings.json')
-const hugoDir = path.join(__dirname, '..', 'hugo')
-searchAndAddMeetingsPages('minutes')
-searchAndAddMeetingsPages('transcripts')
- * Looks for pages in hugo content and if it exist sets a flag that it exsists
-function searchAndAddMeetingsPages(type) {
- const dir = path.join(hugoDir, 'content', type)
- fs.readdirSync(dir).map(file => {
- const key = file.replace(/\.md$/, '')
- if (!meetingsData[key]) {
- meetingsData[key][type] = true
-// Create an ordered array for hugo to read
-const d = Object.entries(meetingsData)
- .sort(([a], [b]) => b.localeCompare(a))
- .map(([key, { ...v }]) => ({ key, ...v }))
-// Write data into hugo data dir
-const targetPath = path.join(hugoDir, 'data', 'meetings.json')
-fs.writeFileSync(targetPath, JSON.stringify(d, null, '\t'))