<commit_before><commit_msg>Add the binary script<commit_after>#!/usr/bin/env node
const parseConfig = require('./lib/parse-config');
const getFiles = require('./lib/get-files');
const parseFiles = require('./lib/parse-files');
const handleDrafts = require('./lib/handle-drafts');
const setPaths = require('./lib/set-file-paths');
const render = require('./lib/render');
const writeFiles = require('./lib/write-files');
const path = require('path');
const parseArgs = require('./lib/parse-args');

parseArgs()
    .then( args => path.isAbsolute(args.config) ? args.config : path.resolve(__dirname, args.config))
    .then( configPath => parseConfig(configPath) )
    .then( config => {

        return getFiles(config)
                .then( files => parseFiles(files) )
                .then( files => handleDrafts(config, files) )
                .then( files => setPaths(config, files) )
                .then( files => render(config, files) )
                .then( files => writeFiles(config, files) );
    })
    .then( () => console.log('Done') )
    .catch( e => console.log(e, e.stack));
{'fraction_non_alphanumeric': 0.1780821917808219, 'fraction_numerical': 0.0, 'mean_word_length': 3.074349442379182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '1125590', 'n_tokens_mistral': 323, 'n_tokens_neox': 315, 'n_words': 71}