<commit_before>var clrz = require('colorz')
var dateFormat = require('toolz/src/date/dateFormat')
var log = require('toolz/src/time/logger')
var clog        = console.log.bind(console)

// clrz settings for colorized output
var blk = clrz.black
var dim = clrz.dim
var blu = process.platform === 'win32' ? clrz.cyan : clrz.blue
var mag = clrz.magenta
var yel = clrz.yellow
var red = clrz.red
var grn = clrz.green
var gry = clrz.grey
var cyn = clrz.cyan


module.exports = {
  file: function (name, action) {
    log(
      'File',
      dim(blk(name)),
      action
    )
  },

  msg: function (obj, verb) {
    log(
      grn('File'),
      dim(blk(obj)),
      verb
    )
  },

  keys: function (label, obj) {
    obj = obj || {}

    var keys = Object
      .keys(obj)
      .sort()
      .join(' ')

    console.log(
      clrz.magenta(label),
      clrz.grey('->'),
      clrz.green(keys)
    )
  },

  infoDisplay: function (globals, argv) {
    clog('')
    clog(dim(blk('---------------------------------------')))
    clog(grn('  BUILD_ENV   : '), mag(globals.BUILD_ENV))
    clog(grn('  BUILD_STAGE : '), mag(globals.BUILD_STAGE))
    clog(grn('  RUNNING_JOB : '), mag(argv.argv))
    clog(dim(blk('---------------------------------------')))
    clog('')
  },

  jobsDisplay: function () {
    var arr = [
      [yel('Jobs'), grn('config:'), dim(blk('--type=globals Display initial global configuration'))],
      [yel('Jobs'), grn('config:'), dim(blk('--type=defaults Display initial default options'))],
      [yel('Jobs'), grn('jobs:'), dim(blk('Display listing of all jobs'))],
      [yel('Jobs'), grn('rendr:'), dim(blk('Default job. Render templates. Nothing else'))],
      [yel('Jobs'), grn('init:'), dim(blk('Clean staging and build directories, generate all support files, rendr templates.'))],
      [yel('Jobs'), grn('dist:'), dim(blk('distribution process'))],
      [yel('Jobs'), grn('uncss:'), dim(blk('reduce size of css'))],
      [yel('Jobs'), grn('clean:'), dim(blk('remove files from staging directory'))]
    ]
    arr.forEach(function (key, idx, arr) {
      log(key[0], key[1], '\t', key[2])
    })
  },

  info: function (predicate, subject) {
    if (typeof subject === 'undefined') subject = ''
    log(
      grn('Info'),
      dim(blk(predicate)),
      mag(subject)
    )
  },

  done: function (noun, verb) {
    log(
      red('Done'),
      blu(verb),
      grn(noun)
    )
  },

  stage: function (src, dest) {<commit_msg>update app/util/logger -- add nano time calculations<commit_after>var clrz       = require('colorz')
var dateFormat = require('toolz/src/date/dateFormat')
var log        = require('toolz/src/time/logger')
var nano       = require('toolz/src/time/nano')
var clog       = console.log.bind(console)

// clrz settings for colorized output
var blk = clrz.black
var dim = clrz.dim
var blu = process.platform === 'win32' ? clrz.cyan : clrz.blue
var mag = clrz.magenta
var yel = clrz.yellow
var red = clrz.red
var grn = clrz.green
var gry = clrz.grey
var cyn = clrz.cyan


module.exports = {
  file: function (name, action) {
    log(
      'File',
      dim(blk(name)),
      action
    )
  },

  msg: function (obj, verb) {
    log(
      grn('File'),
      dim(blk(obj)),
      verb
    )
  },

  keys: function (label, obj) {
    obj = obj || {}

    var keys = Object
      .keys(obj)
      .sort()
      .join(' ')

    console.log(
      clrz.magenta(label),
      clrz.grey('->'),
      clrz.green(keys)
    )
  },

  infoDisplay: function (globals, argv) {
    clog('')
    clog(dim(blk('---------------------------------------')))
    clog(grn('  BUILD_ENV   : '), mag(globals.BUILD_ENV))
    clog(grn('  BUILD_STAGE : '), mag(globals.BUILD_STAGE))
    clog(grn('  RUNNING_JOB : '), mag(argv.argv))
    clog(dim(blk('---------------------------------------')))
    clog('')
  },

  jobsDisplay: function () {
    var arr = [
      [yel('Jobs'), grn('config:'), dim(blk('--type=globals Display initial global configuration'))],
      [yel('Jobs'), grn('config:'), dim(blk('--type=defaults Display initial default options'))],
      [yel('Jobs'), grn('jobs:'), dim(blk('Display listing of all jobs'))],
      [yel('Jobs'), grn('rendr:'), dim(blk('Default job. Render templates. Nothing else'))],
      [yel('Jobs'), grn('init:'), dim(blk('Clean staging and build directories, generate all support files, rendr templates.'))],
      [yel('Jobs'), grn('dist:'), dim(blk('distribution process'))],
      [yel('Jobs'), grn('uncss:'), dim(blk('reduce size of css'))],
      [yel('Jobs'), grn('clean:'), dim(blk('remove files from staging directory'))]
    ]
    arr.forEach(function (key, idx, arr) {
      log(key[0], key[1], '\t', key[2])
    })
  },

  info: function (predicate, subject) {
    if (typeof subject === 'undefined') subject = ''
    log(
      grn('Info'),
      dim(blk(predicate)),
      mag(subject)
    )
  },

  done: function (noun, verb, time) {
    if (time) log(
      red('Done'),
      blu(verb),
      grn(noun),
      dim(blk('(')),
      mag(nano(process.hrtime(time), 4) + 's'),
      dim(blk(')'))
    )
    else log(
      red('Done'),
      blu(verb),
      grn(noun)
    )
  },

  stage: function (src, dest) {
{'fraction_non_alphanumeric': 0.21720760514691762, 'fraction_numerical': 0.0021125408104474747, 'mean_word_length': 2.5622435020519836, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3991824', 'n_tokens_mistral': 1854, 'n_tokens_neox': 1791, 'n_words': 407}