<commit_before>var fs = require('fs');

function parse (args) {
  var optimist = require('optimist')
    ;
  var content = fs.readFileSync(__dirname + '/usage.txt').toString( );
  var usage = {
    help: {
      description: "Some more details about mmcsv"
    , required: true
    , short: 'h' 
    }
  };
  // var main = args.shift( );
  var config = optimist(args)
      .usage(content, usage)
    ;
  config.$0 = 'mmcsv';
  var opts = config.argv;
  opts.help = config.help;

  opts.command = opts._.shift( );
  var sub;
  switch (opts.command) {
    case 'fetch':
      sub = require('./fetch')(config);
      break;
    case 'parse':
      sub = require('./parse')(config);
      break;
    default:
      break;
  }
  /*
  if (!opts.command || opts.command == 'help') {
    config.showHelp( );
    process.exit(0);
  }<commit_msg>blarg<commit_after>var fs = require('fs');

function parse (args) {
  var optimist = require('optimist')
    ;
  var content = fs.readFileSync(__dirname + '/usage.txt').toString( );
  var usage = {
    help: {
      description: "Some more details about mmcsv"
    , required: true
    , short: 'h' 
    }
  };
  // var main = args.shift( );
  var config = optimist(args)
      .usage(content, usage)
    ;
  config.$0 = 'mmcsv';
  var opts = config.argv;
  opts.help = config.help;

  opts.command = opts._.shift( );
  var sub;
  switch (opts.command) {
    case 'fetch':
      sub = require('./fetch')(config);
      break;
    case 'parse':
      sub = require('./parse')(config);
      break;
    default:
      break;
  }
  opts.main = sub;
  /*
  if (!opts.command || opts.command == 'help') {
    config.showHelp( );
    process.exit(0);
  }
{'fraction_non_alphanumeric': 0.16913946587537093, 'fraction_numerical': 0.002373887240356083, 'mean_word_length': 2.4060606060606062, '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': '1939239', 'n_tokens_mistral': 574, 'n_tokens_neox': 568, 'n_words': 132}