<commit_before>'use strict';

const Ores = require('../lib/ores');
const Config = require('../lib/config');

module.exports = function oresCommand(program) {

  program
    .command('ores')
    .description('Manage ores in mods.')
    .action((args, command) => {
      let options = Config(program);

      let ores = new Ores(options);

      ores.manage(args)
      	.catch((err) => {
      		console.warn(err.red.bold);
      	});
    });
};<commit_msg>More ores refactoring (#21)<commit_after>'use strict';

const Ores = require('../lib/ores');
const Config = require('../lib/config');

module.exports = function oresCommand(program) {

  program
    .command('ores')
    .description('Manage ores in mods.')
    .action((args, command) => {
      let options = Config(program);

      let ores = new Ores(options);
      ores.setup()
      .then(result => {
        if(!result) {
          return;
        }

        ores.frequency()
        .catch(err => {
          // console.warn(err.red.bold);
          console.warn(err);
        });;
      });
    });
};
{'fraction_non_alphanumeric': 0.17713214620431114, 'fraction_numerical': 0.0018744142455482662, 'mean_word_length': 2.2962962962962963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '6388963', 'n_tokens_mistral': 347, 'n_tokens_neox': 333, 'n_words': 66}