@@ -6,6 +6,7 @@ var email = require('emailjs');
66var fs = require ( 'fs' ) ;
77var path = require ( 'path' ) ;
88var program = require ( 'commander' ) ;
9+ const Mustache = require ( 'mustache' ) ;
910var scrawl = require ( './www/scrawl' ) ;
1011var Twitter = require ( 'twitter' ) ;
1112var wp = require ( 'wordpress' ) ;
@@ -50,6 +51,17 @@ gDate = gDate.match(/([0-9]{4}-[0-9]{2}-[0-9]{2})/)[1];
5051scrawl . group = 'JSON-LD CG Telecon' ;
5152scrawl . people = JSON . parse ( peopleJson ) ;
5253
54+ const EMAIL_BODY = `Thanks to {{scribe}} for scribing this week! The minutes
55+ for this week's JSON-LD CG telecon are now available:
56+
57+ https://json-ld.github.io/minutes/{{gDate}}/
58+
59+ Full text of the discussion follows for W3C archival purposes.
60+ Audio from the meeting is available as well (link provided below).
61+
62+ ----------------------------------------------------------------
63+ {{{content}}}` ;
64+
5365/************************* Utility Functions *********************************/
5466function postToWordpress ( username , password , content , callback ) {
5567 var client = wp . createClient ( {
@@ -286,13 +298,7 @@ async.waterfall([ function(callback) {
286298 var content = scrawl . generateMinutes ( gLogData , 'text' , gDate , haveAudio ) ;
287299 var scribe = content . match ( / S c r i b e : \n \s ( .* ) \n / g) [ 0 ]
288300 . replace ( / \n / g, '' ) . replace ( 'Scribe: ' , '' ) ;
289- content = 'Thanks to ' + scribe + ' for scribing this week! The minutes\n' +
290- 'for this week\'s JSON-LD CG telecon are now available:\n\n' +
291- 'https://json-ld.github.io/minutes/' + gDate + '/\n\n' +
292- 'Full text of the discussion follows for W3C archival purposes.\n' +
293- 'Audio from the meeting is available as well (link provided below).\n\n' +
294- '----------------------------------------------------------------\n' +
295- content ;
301+ content = Mustache . render ( EMAIL_BODY , { scribe, gDate, content} ) ;
296302
297303 if ( process . env . SCRAWL_EMAIL_USERNAME && process . env . SCRAWL_EMAIL_PASSWORD &&
298304 process . env . SCRAWL_EMAIL_SERVER ) {
0 commit comments