<commit_before>//configuration.js
var fs = require('fs');

//Function for loading and returning the settings.json file, makes one if there isn't one.
module.exports = function () {
  if (!fs.existsSync(__dirname + '/settings.json')) {
    var settings = {
      'env' : 'dev',
      'database' : 'example.com/database',
      'web_port' : 1024,
      'amount_of_hours' : 7,
      'hour_times' : [
				'8:45 - 9:45',
				'9:45 - 10:45',
				'11:10 - 12:10',
				'12:10 - 13:10',
				'13:40 - 14:40',
				'14:40 - 15:40',
				'15:40 - 16:40'
			],
      'school_id' : 934,
      'links' : {
          'Login': ['#', '#96AA48'],
          'Magister': ['http://werkman.magister.net', '#0C5489'],
          'Mail': ['https://login.microsoftonline.com/', '#C41824']
      }
    }
    fs.writeFileSync(__dirname + '/settings.json', JSON.stringify(settings, null, 2));

    return settings;
  }
  else {
    return JSON.parse(fs.readFileSync(__dirname + '/settings.json'));
  }
}

if (process.argv[2] == 'test') {
  console.log(module.exports());
}<commit_msg>Redid tabs and added some comments for explainin'<commit_after>//configuration.js
var fs = require('fs');

//Function for loading and returning the settings.json file, makes one if there isn't one.
module.exports = function () {
   if (!fs.existsSync(__dirname + '/settings.json')) {
      //Template for settings.json if not available.
      var settings = {
         'env' : 'dev',
         'database' : 'example.com/database',
         'web_port' : 1024,
         'amount_of_hours' : 7,
         'hour_times' : [
            '8:45 - 9:45',
            '9:45 - 10:45',
            '11:10 - 12:10',
            '12:10 - 13:10',
            '13:40 - 14:40',
            '14:40 - 15:40',
            '15:40 - 16:40'
         ],
         'school_id' : 934,
         'links' : {
            'Login': ['#', '#96AA48'],
            'Magister': ['http://werkman.magister.net', '#0C5489'],
            'Mail': ['https://login.microsoftonline.com/', '#C41824']
         }
      }
      fs.writeFileSync(__dirname + '/settings.json', JSON.stringify(settings, null, 2));

      return settings;
   }
   else {
      return JSON.parse(fs.readFileSync(__dirname + '/settings.json'));
   }
}

if (process.argv[2] == 'test') {
   console.log(module.exports());
}
{'fraction_non_alphanumeric': 0.18739130434782608, 'fraction_numerical': 0.06695652173913043, 'mean_word_length': 2.2181818181818183, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5783804', 'n_tokens_mistral': 901, 'n_tokens_neox': 777, 'n_words': 161}