<commit_before>/*
 * Blacksmith - Top-level include for the blacksmith project
 *
 * (C) 2011, Nodejitsu Inc.
 *
 */

var smith    = exports,
    winston  = require('winston'),
    path     = require('path'),
    jsdom    = require('jsdom'),
    fs       = require('fs'),
    nconf    = require('nconf'),
    prompt   = require('prompt');

smith.helpers = require('./helpers');
smith.sites = require('blacksmith-sites');


smith.log = new winston.Logger({
  transports: [
    new winston.transports.Console({
      level: 'silly',
      colorize: false
    })
  ]
});

// Use nconf to manage global configuration. Attached to smith object for later
// use.
smith.config = nconf;

// Try to load configuration if the file exists.
if (path.existsSync('./config.json')) {
  smith.config.add("global", { type: "file", file: "./config.json"});
}

// smith.loaders is a list of key/value pairs so we can depend on method
// execution being in-order.
smith.loaders = [
  'authors',
  'theme',
  'content',
  'toc',
  'rss',
  'errors'
].map(function (k) {
  var t = {};
  t[k] = require('./loaders/' + k);<commit_msg>Changed logging level to "debug" and turned colors back on<commit_after>/*
 * Blacksmith - Top-level include for the blacksmith project
 *
 * (C) 2011, Nodejitsu Inc.
 *
 */

var smith    = exports,
    winston  = require('winston'),
    path     = require('path'),
    jsdom    = require('jsdom'),
    fs       = require('fs'),
    nconf    = require('nconf'),
    prompt   = require('prompt');

smith.helpers = require('./helpers');
smith.sites = require('blacksmith-sites');

// TODO: Make configurable.
smith.log = new winston.Logger({
  transports: [
    new winston.transports.Console({
      level: 'debug',
      colorize: true
    })
  ]
});

// Use nconf to manage global configuration. Attached to smith object for later
// use.
smith.config = nconf;

// Try to load configuration if the file exists.
if (path.existsSync('./config.json')) {
  smith.config.add("global", { type: "file", file: "./config.json"});
}

// smith.loaders is a list of key/value pairs so we can depend on method
// execution being in-order.
smith.loaders = [
  'authors',
  'theme',
  'content',
  'toc',
  'rss',
  'errors'
].map(function (k) {
  var t = {};
  t[k] = require('./loaders/' + k);
{'fraction_non_alphanumeric': 0.16673941510257528, 'fraction_numerical': 0.003491924923614142, 'mean_word_length': 2.9517241379310346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '7511704', 'n_tokens_mistral': 768, 'n_tokens_neox': 746, 'n_words': 213}