-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemails.js
More file actions
26 lines (24 loc) · 753 Bytes
/
emails.js
File metadata and controls
26 lines (24 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var fs = require('fs');
var Teachers = {};
data = fs.readFileSync('emails_facstaff_20160520.csv', 'utf8');
data = data.split('\n');
for (var lineindex in data) {
var line = data[lineindex].trim().split(',');
var name;
if(line[2]) name = line[2].trim() + ', ' + line[1].trim().slice(0,1);
else name = line[line.length - 1].trim();
Teachers[name] = line[0].trim();
}
Teachers['Leon Chou'] = 'leonchou123@gmail.com';
Teachers['Johnny So'] = 'jso123450@gmail.com';
Teachers['Roy Xu'] = 'rx367@nyu.edu';
var emails = {
'Teachers': Teachers,
'Administrators': {
'Leon': 'bleepbloopsify@gmail.com',
'Cintron': 'ccintron@stuy.edu',
'Johnny' : 'sharpnkill@gmail.com',
'Roy' : 'royxu652@gmail.com'
},
};
module.exports = emails;