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

var _ = require("lodash");

var package = require("./package.json");
var run = require("./lib/run");

var program = require("commander").command(package.name);
var args = process.argv.slice(2);

//==============================================================================

program
  .version(package.version, "-v, --version")
  .option("--connect <connect>", "Db connection string")
  .option("--from <from>", "Source folder or file")
  .option("--to <to>", "Destination table")
  .option("--local-dir <local_dir>", "Local directory where remote files are synced, default=./tmp", "tmp")
  .option("--access-key <access_key>", "AWS access key")
  .option("--secret-key <secret_key>", "AWS secret key")
  .option("--ignore-attrs <attrs_list>", "Ignore attributes")
  .option("-p, --processors <processors>", "Number of processors, default=1", function(v) {return _.toInteger(v)}, 1)
  .option("-r, --recursive [true|false]", "Recursive copy, default=false", function(v) {return v !== "false"}, false)
  .option("-f, --force [true|false]", "Non-interactive, default=false", function(v) {return v !== "false"}, false)
  .option("-d, --debug [true|false]", "Show debug messages, default=false", function(v) {return v !== "false"}, false)
  .parse(process.argv);

//-- show help for empty arguments...
!args.length && program.help();

//-- run the program...
run(program.opts());

//==============================================================================<commit_msg>set default local dir to /tmp/<package.name><commit_after>#!/usr/bin/env node

var _ = require("lodash");

var package = require("./package.json");
var run = require("./lib/run");

var program = require("commander").command(package.name);
var args = process.argv.slice(2);

var localDir = "/tmp/" + package.name;

//==============================================================================

program
  .version(package.version, "-v, --version")
  .option("--connect <connect>", "Db connection string")
  .option("--from <from>", "Source folder or file")
  .option("--to <to>", "Destination table")
  .option("--local-dir <local_dir>", "Local directory where remote files are synced, default=" + localDir, localDir)
  .option("--access-key <access_key>", "AWS access key")
  .option("--secret-key <secret_key>", "AWS secret key")
  .option("--ignore-attrs <attrs_list>", "Ignore attributes")
  .option("-p, --processors <processors>", "Number of processors, default=1", function(v) {return _.toInteger(v)}, 1)
  .option("-r, --recursive [true|false]", "Recursive copy, default=false", function(v) {return v !== "false"}, false)
  .option("-f, --force [true|false]", "Non-interactive, default=false", function(v) {return v !== "false"}, false)
  .option("-d, --debug [true|false]", "Show debug messages, default=false", function(v) {return v !== "false"}, false)
  .parse(process.argv);

//-- show help for empty arguments...
!args.length && program.help();

//-- run the program...
run(program.opts());

//==============================================================================
{'fraction_non_alphanumeric': 0.2986425339366516, 'fraction_numerical': 0.0019392372333548805, 'mean_word_length': 4.986460348162476, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '6896979', 'n_tokens_mistral': 917, 'n_tokens_neox': 900, 'n_words': 242}