3 var synonyms = cat('./tag-synonyms.txt');
4 synonyms.split(/\n+/).forEach(function(line) {
6 if (line[0] === '#') return;
8 print('Handling ', line);
11 var parts = line.split(':');
13 if (parts.length === 1) {
21 db.tagsynonyms.update({
34 printjson({ name: name, synonym: synonym });
38 db.tagsynonyms.ensureIndex({ name: 1 }, { unique: true });
39 db.tagsynonyms.ensureIndex({ synonyms: 1 }, { unique: true });