<commit_before>#!/usr/bin/env node
var fs = require('fs'),
  deja = require('./lib/deja')
  argv = require('optimist').argv

var home = process.env.HOME

// if HOME not set, die
if (home == undefined) {
  console.log('Error: HOME environmental variable not defined.')
  process.exit(1)
}

var dejaHome = home + '/.deja'

// make sure .deja exists in home directory
try {
  fs.mkdirSync(dejaHome, 0700)
} catch(e) {}

// deal with command line input
if (argv['_'].length < 1 || argv['_'].length > 2) {

  invalid_command() 
}
else if(argv['_'].length == 2) {

  var command = argv['_'][0]
  var param   = argv['_'][1]

  switch(command) {

    case 'clone':
      deja.cloneRepo(home, dejaHome, param)
      break

    case 'pull':
      deja.pullRepo(dejaHome, param)
      break

    case 'diff':
      deja.diffRepo(home, dejaHome, param)
      break

    case 'rm':
      deja.rmRepo(dejaHome, param)
      break

    default:
      invalid_command()
  }
}
else {<commit_msg>Added deletion of associated symlinks when repo is deleted.<commit_after>#!/usr/bin/env node
var fs = require('fs'),
  deja = require('./lib/deja')
  argv = require('optimist').argv

var home = process.env.HOME

// if HOME not set, die
if (home == undefined) {
  console.log('Error: HOME environmental variable not defined.')
  process.exit(1)
}

var dejaHome = home + '/.deja'

// make sure .deja exists in home directory
try {
  fs.mkdirSync(dejaHome, 0700)
} catch(e) {}

// deal with command line input
if (argv['_'].length < 1 || argv['_'].length > 2) {

  invalid_command() 
}
else if(argv['_'].length == 2) {

  var command = argv['_'][0]
  var param   = argv['_'][1]

  switch(command) {

    case 'clone':
      deja.cloneRepo(home, dejaHome, param)
      break

    case 'pull':
      deja.pullRepo(dejaHome, param)
      break

    case 'diff':
      deja.diffRepo(home, dejaHome, param)
      break

    case 'rm':
      deja.rmRepo(home, dejaHome, param)
      break

    default:
      invalid_command()
  }
}
else {
{'fraction_non_alphanumeric': 0.15438247011952191, 'fraction_numerical': 0.0099601593625498, 'mean_word_length': 2.8709055876685934, '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': '2151311', 'n_tokens_mistral': 733, 'n_tokens_neox': 708, 'n_words': 185}