<commit_before>Importer = require '../lib/csv/importer'
Exporter = require '../lib/csv/exporter'
package_json = require '../package.json'
{ProjectCredentialsConfig,ExtendedLogger} = require 'sphere-node-utils'

yargs = require 'yargs'
  .usage 'Usage: $0 <command> [options]'
  .describe 'p', 'project key'
  .alias 'p', 'project-key'
  .demand 'p'

  .describe 'i', 'client id'
  .alias 'i', 'client-id'

  .describe 's', 'client secret'
  .alias 's', 'client-secret'

  .describe 'language'
  .nargs 'language', 1
  .default 'language', 'en'

  .describe 'parentBy'
  .nargs 'parentBy', 1
  .default 'parentBy', 'externalId'

  .describe 'continueOnProblems'
  .boolean 'continueOnProblems'

  .command 'export', 'Export categories'
  .command 'import', 'Import categories'

  .help 'h'
  .alias 'h', 'help'

  .version package_json.version

  .epilog 'copyright 2015'

argv = yargs.argv
command = argv._[0]
project_key = argv.p
language = argv.language
parentBy = argv.parentBy
continueOnProblems = argv.continueOnProblems

logger = new ExtendedLogger<commit_msg>Tweak the command line options.<commit_after>Importer = require '../lib/csv/importer'
Exporter = require '../lib/csv/exporter'
package_json = require '../package.json'
{ProjectCredentialsConfig,ExtendedLogger} = require 'sphere-node-utils'

yargs = require 'yargs'
  .usage 'Usage: $0 <command> [options]'
  .describe 'p', 'project key'
  .alias 'p', 'project-key'
  .demand 'p'

  .describe 'i', 'client id'
  .alias 'i', 'client-id'

  .describe 's', 'client secret'
  .alias 's', 'client-secret'

  .describe 'language', 'Language used for slugs when referencing parent.'
  .nargs 'language', 1
  .default 'language', 'en'

  .describe 'parentBy', 'Property used to reference parent - use externalId or slug or id'
  .nargs 'parentBy', 1
  .default 'parentBy', 'externalId'

  .describe 'continueOnProblems', 'Continue with creating/updating further categories even if API returned with 400 status code.'
  .boolean 'continueOnProblems'
  .default 'continueOnProblems', false

  .command 'export', 'Export categories'
  .command 'import', 'Import categories'

  .help 'h'
  .alias 'h', 'help'

  .version package_json.version

  .epilog 'copyright 2015'

argv = yargs.argv
command = argv._[0]
project_key = argv.p
language = argv.language
parentBy = argv.parentBy
continueOnProblems = argv.continueOnProblems

logger = new ExtendedLogger
{'fraction_non_alphanumeric': 0.14131338320864506, 'fraction_numerical': 0.007896924355777223, 'mean_word_length': 4.121276595744681, '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': '1963579', 'n_tokens_mistral': 835, 'n_tokens_neox': 769, 'n_words': 229}