Skip to content

Commit 04bc5d8

Browse files
committed
Use Mustache template for G+ content
1 parent 94b3f35 commit 04bc5d8

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

index.js

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ Audio from the meeting is available as well (link provided below).
6767
----------------------------------------------------------------
6868
{{{content}}}`;
6969

70+
const GPLUS_BODY = `*JSON-LD CG Meeting Summary for {{gDate}}*
71+
72+
We discussed {{formattedItems}}.
73+
74+
{{{content}}}
75+
76+
Full transcript and audio logs are available here:
77+
78+
https://json-ld.github.io/minutes/{{gDate}}/
79+
80+
#w3c #json-ld`;
81+
7082
/************************* Utility Functions *********************************/
7183
function postToWordpress(username, password, content, callback) {
7284
var client = wp.createClient({
@@ -368,11 +380,7 @@ async.waterfall([ function(callback) {
368380
}
369381

370382
// format in a way that is readable on G+
371-
content = '*JSON-LD CG Meeting Summary for ' + gDate + '*\n\n' +
372-
'We discussed ' + formattedItems + '.\n\n' +
373-
content + '\nFull transcript and audio logs are available here:\n\n' +
374-
'https://json-ld.github.io/minutes/' + gDate + '/\n\n' +
375-
'#w3c #json-ld';
383+
content = Mustache.render(GPLUS_BODY, {gDate, formattedItems, content});
376384

377385
console.log('scrawl: You will need to paste this to your G+ stream:\n');
378386
console.log(content);

0 commit comments

Comments
 (0)