<commit_before>#!/usr/bin/env node
'use strict';

var program = require('commander');
var fs = require('fs');

var array = fs.readFileSync('input/graph.txt').toString().split(',');
var i = 0;
for(i in array) {
    console.log(array[i].trim());
}
 
program
  .version('0.0.1')
  .option('-l, --load', 'Load a graph file')
  .option('-r, --route', 'Calculate distance of a route')
  .option('-t, --test', 'Run the tests')
  .parse(process.argv);

  console.log(program.args);<commit_msg>works with provided filename<commit_after>#!/usr/bin/env node
'use strict';

var program = require('commander');
var fs = require('fs');


function LoadGraph(graph){

var array = fs.readFileSync(graph).toString().split(',');
var i = 0;
for(i in array) {
    console.log(array[i].trim());
}

// Assuming file can be read OK, then it needs to be additionally validated.  return true if ok, otherwise error out

};

 
program
  .version('0.0.1')
  .option('-l, --load', 'Load a graph file')
  .option('-r, --route', 'Calculate distance of a route')
  .option('-t, --test', 'Run the tests')
  .parse(process.argv);


//check for test, help first.  if either are true - do it and exit
// use default graph if no graph specified, otherwise load and validate supplied graph text file

if (program.load) LoadGraph(program.args.toString());

{'fraction_non_alphanumeric': 0.17995444191343962, 'fraction_numerical': 0.006074411541381929, 'mean_word_length': 3.8814814814814813, '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': '5666991', 'n_tokens_mistral': 446, 'n_tokens_neox': 431, 'n_words': 138}