Skip to content

Commit fb80e2c

Browse files
committed
Make base URL & chairs configurable
Added `chairs: true` to people.json format
1 parent 875ea64 commit fb80e2c

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ const WORDPRESS_TITLE = 'JSON-LD CG Meeting Minutes for {{gDate}}';
8989
// Location of date-based minutes folders; MUST end in a forward slash
9090
const MINUTES_BASE_URL = 'https://json-ld.github.io/minutes/'
9191

92+
scrawl.minutes_base_url = MINUTES_BASE_URL;
93+
9294
/************************* Utility Functions *********************************/
9395
function postToWordpress(username, password, content, callback) {
9496
var client = wp.createClient({

people.json.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
],
77
"homepage": "https://example.com/~person-nick"
88
},
9-
"Other Person": {
9+
"Chair Person": {
10+
"chair": true,
1011
"homepage": "http://example.com/~other-person"
1112
}
1213
}

www/scrawl.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
scrawl.updateCounter = 1;
4545
scrawl.updateCounterTimeout = null;
4646

47+
// TODO: make it clearer what's internal only and what's configurable
48+
// ...these happen to be configurable...
49+
scrawl.minutes_base_url = '';
50+
scrawl.chair = [];
51+
4752
scrawl.wordwrap = function(str, width, brk, cut )
4853
{
4954
brk = brk || '\n';
@@ -737,7 +742,7 @@
737742
rval += 'Present:\n ' +
738743
scrawl.wordwrap(peoplePresent, 65, '\n ') + '\n';
739744
if(context.audio) {
740-
rval += 'Audio:\n https://json-ld.github.io/minutes/' +
745+
rval += 'Audio:\n ' + scrawl.minutes_base_url +
741746
time.getFullYear() + '-' +
742747
month + '-' + day + '/audio.ogg\n\n';
743748
} else {
@@ -757,11 +762,17 @@
757762
var aliases = scrawl.generateAliases();
758763
scrawl.counter = 0;
759764

765+
// TODO: expose this better?
766+
// TODO: return objects so we can link things
767+
var chair = Object.keys(scrawl.people).filter((key) => {
768+
return 'chair' in scrawl.people[key] && scrawl.people[key].chair;
769+
});
770+
760771
// initialize the IRC log scanning context
761772
var context =
762773
{
763774
'group': scrawl.group,
764-
'chair': ['Gregg Kellogg', 'Rob Sanderson'],
775+
'chair': chair,
765776
'present': {},
766777
'scribe': [],
767778
'topics': [],

0 commit comments

Comments
 (0)