<commit_before>part of darn;

final List<Command> commands = [
  new BuildCommand()
];

void main(List<String> args) {
  var argp = new ArgParser(allowTrailingOptions: false);
  
  for (var cmd in commands) {
    argp.addCommand(cmd.name, cmd.arguments);
  }
  
  var opts = argp.parse(args);
  
  if (opts.command == null) {
    print("Usage: darn <command> [args]");
    print(argp.getUsage());
    exit(0);
  }
  
  var cmd = commands.firstWhere((cmd) => cmd.name == opts.command.name);
  
  cmd.run(opts.command);
}<commit_msg>Cool Stuff<commit_after>part of darn;

final List<Command> commands = [
  new BuildCommand()
];

void main(List<String> args) {
  var argp = new ArgParser(allowTrailingOptions: false);
  
  argp.addFlag("help", abbr: "h", help: "Prints this Help Message", defaultsTo: false, negatable: false);
  
  for (var cmd in commands) {
    var it = cmd.arguments;
    it.addFlag("help", abbr: "h", help: "Prints this Help Message", defaultsTo: false, negatable: false);
    argp.addCommand(cmd.name, it);
  }
  
  var opts = argp.parse(args);
  
  if (opts.command == null && opts.options.contains("help")) {
    print("Usage: darn <command> [args]");
    print(argp.getUsage());
    exit(0);
  }
  
  var cmd = commands.firstWhere((cmd) => cmd.name == opts.command.name);
  
  
  if (opts.command.options.contains("help")) {
    print("Usage: darn ${cmd.name} [args]");
    print(argp.commands[opts.command.name].getUsage());
    exit(0);
  }
  
  cmd.run(opts.command);
}
{'fraction_non_alphanumeric': 0.16789297658862876, 'fraction_numerical': 0.002006688963210702, 'mean_word_length': 3.603076923076923, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '7613542', 'n_tokens_mistral': 535, 'n_tokens_neox': 532, 'n_words': 119}