imfreedom/www.imfreedom.org

Move meeting metadata into minutes.

2019-06-18, Elliott Sales de Andrade
bffc3dbbe06e
Parents b051590c373a
Children d83c0494462a
Move meeting metadata into minutes.

This removes the need to create a meetings JSON file.
--- a/data/meetings.json Tue Jun 18 01:09:24 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-{
- "2019-06-11": {
- "audio": {
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20190611.ogg"
- },
- "video": {
- "mpeg4": "https://data.imfreedom.org/public/board-meetings/video-20190611.mp4"
- }
- },
- "2018-05-03": {
- "audio": {
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20180503.ogg"
- },
- "video": {
- "mpeg4": "https://data.imfreedom.org/public/board-meetings/video-20180503.mp4"
- }
- },
- "2017-09-07": {
- "note": "no transcript or recordings"
- },
- "2016-08-24": {
- "note": "no transcript or recordings"
- },
- "2016-06-07": {
- "note": "no transcript or recordings"
- },
- "2012-04-18": {
- "note": "no transcript or recordings"
- },
- "2011-04-14": {
- "note": "no transcript or recordings"
- },
- "2009-11-23": {
- "note": "no minutes or recordings"
- },
- "2013-04-15": {
- "audio": {
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20130415.ogg"
- }
- }
-}
--- a/hugo/content/minutes/2013-04-15.md Tue Jun 18 01:09:24 2019 -0400
+++ b/hugo/content/minutes/2013-04-15.md Tue Jun 18 02:00:34 2019 -0400
@@ -1,6 +1,8 @@
---
title: "Minutes for the 2013-04-15 Board Meeting"
date: 2013-04-15
+audio:
+ - "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 Tue Jun 18 01:09:24 2019 -0400
+++ b/hugo/content/minutes/2018-05-03.md Tue Jun 18 02:00:34 2019 -0400
@@ -1,6 +1,10 @@
---
title: "Minutes for the 2018-05-03 Board Meeting"
date: 2018-05-03
+audio:
+ - "https://data.imfreedom.org/public/board-meetings/audio-20180503.ogg"
+videos:
+ - "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 Tue Jun 18 01:09:24 2019 -0400
+++ b/hugo/content/minutes/2019-06-11.md Tue Jun 18 02:00:34 2019 -0400
@@ -1,6 +1,10 @@
---
title: "Minutes for the 2019-06-11 Board Meeting"
date: 2019-06-11
+audio:
+ - "https://data.imfreedom.org/public/board-meetings/audio-20190611.ogg"
+videos:
+ - "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 Tue Jun 18 01:09:24 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-[
- {
- "key": "2019-06-11",
- "audio": {
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20190611.ogg"
- },
- "video": {
- "mpeg4": "https://data.imfreedom.org/public/board-meetings/video-20190611.mp4"
- },
- "minutes": true
- },
- {
- "key": "2018-05-03",
- "audio": {
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20180503.ogg"
- },
- "video": {
- "mpeg4": "https://data.imfreedom.org/public/board-meetings/video-20180503.mp4"
- },
- "minutes": true
- },
- {
- "key": "2017-09-07",
- "note": "no transcript or recordings",
- "minutes": true
- },
- {
- "key": "2016-08-24",
- "note": "no transcript or recordings",
- "minutes": true
- },
- {
- "key": "2016-06-07",
- "note": "no transcript or recordings",
- "minutes": true
- },
- {
- "key": "2013-04-15",
- "audio": {
- "ogg": "https://data.imfreedom.org/public/board-meetings/audio-20130415.ogg"
- },
- "minutes": true
- },
- {
- "key": "2012-04-18",
- "note": "no transcript or recordings",
- "minutes": true
- },
- {
- "key": "2011-04-14",
- "note": "no transcript or recordings",
- "minutes": true
- },
- {
- "key": "2009-11-23",
- "note": "no minutes or recordings",
- "transcripts": true
- },
- {
- "key": "2008-05-20",
- "minutes": true,
- "transcripts": true
- },
- {
- "key": "2007-05-15",
- "minutes": true,
- "transcripts": true
- }
-]
\ No newline at end of file
--- a/tools/populate-meetings-data.js Tue Jun 18 01:09:24 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/**
- * Creates meetings data for hugo to consume
- *
- * From:
- * * data/meetings.json
- * * 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
- * @param {string} type
- */
-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] = {}
- }
-
- 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'))
-
-console.log('done')