<commit_before>#! /usr/bin/env node

// Print error message and quit if an error is found
process.on('uncaughtException', function(error) {
  console.error('Error: ' + error.message)
  process.exit(1)
});

// Remove the first two paths
var args = process.argv.slice(2);

// Assume the next path is the input file to be processed
var input = args[0];

require('./process-file.js')(input)<commit_msg>Perform checks to the number of  arguments<commit_after>#! /usr/bin/env node

// Print error message and quit if an error is found
process.on('uncaughtException', function(error) {
  console.error('Error: ' + error.message)
  process.exit(1)
});

// Remove the first two paths
var args = process.argv.slice(2);

if(args.length == 0) {
  console.log('Syntax: chordsheet <input-file> [output-file]');
  process.exit(1);
} else if(args.length > 2) {
  console.error('Too many arguments found');
  console.log('Syntax: chordsheet <input-file> [output-file]');
  process.exit(1);
}

// Assume the next path is the input file to be processed
var input = args[0];

require('./process-file.js')(input)
{'fraction_non_alphanumeric': 0.15123739688359303, 'fraction_numerical': 0.00916590284142988, 'mean_word_length': 4.27536231884058, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '1802467', 'n_tokens_mistral': 353, 'n_tokens_neox': 349, 'n_words': 106}