<commit_before>"use strict"

const program = require('commander')

function executeSingleParamCommand(cmd,param)
{
    let c = require('./commands/' + cmd + ".js")
    c(param)
}

//Setting up program commands

program
  .description("ADR: Architecture Decision Records Utility")
  .version('0.6.0')
  .usage("<command> args")
  .command("init [directory]")
    .description("Initialize ADR in the current or given directory")<commit_msg>Taking the program version from the package.json file.<commit_after>"use strict"

const program = require('commander')

function executeSingleParamCommand(cmd,param)
{
    let c = require('./commands/' + cmd + ".js")
    c(param)
}

function extractVersion()
{
    let fs = require('fs')
    let json = JSON.parse(fs.readFileSync('package.json', 'utf8'))
    return json.version
}

//Setting up program commands

program
  .description("ADR: Architecture Decision Records Utility")
  .version(extractVersion())
  .usage("<command> args")
  .command("init [directory]")
    .description("Initialize ADR in the current or given directory")
{'fraction_non_alphanumeric': 0.14046511627906977, 'fraction_numerical': 0.0037209302325581397, 'mean_word_length': 4.489795918367347, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1136752', 'n_tokens_mistral': 314, 'n_tokens_neox': 308, 'n_words': 89}