<commit_before>import * as os from 'os';
import * as path from 'path';

import * as chalk from 'chalk';
import * as stringWidth from 'string-width';

import { load } from '../modules';

export const ICON_SUCCESS = '✔';
export const ICON_FAILURE = '✖';

export const ICON_SUCCESS_GREEN = chalk.green(ICON_SUCCESS);
export const ICON_FAILURE_RED = chalk.red(ICON_FAILURE);

export function prettyPath(p: string): string {
  const cwd = process.cwd();
  const d = path.dirname(p);
  const h = os.homedir();

  if (cwd === d) {
    return './' + path.basename(p);
  } else if (d.startsWith(cwd)) {
    return './' + p.substring(cwd.length + 1);
  } else if (p.indexOf(h) === 0) {
    return '~/' + p.substring(h.length + 1);
  }<commit_msg>chore(): show windows path sep during pretty output<commit_after>import * as os from 'os';
import * as path from 'path';

import * as chalk from 'chalk';
import * as stringWidth from 'string-width';

import { load } from '../modules';

export const ICON_SUCCESS = '✔';
export const ICON_FAILURE = '✖';

export const ICON_SUCCESS_GREEN = chalk.green(ICON_SUCCESS);
export const ICON_FAILURE_RED = chalk.red(ICON_FAILURE);

export function prettyPath(p: string): string {
  const cwd = process.cwd();
  const d = path.dirname(p);
  const h = os.homedir();

  if (cwd === d) {
    return '.' + path.sep + path.basename(p);
  } else if (d.startsWith(cwd)) {
    return '.' + path.sep + p.substring(cwd.length + 1);
  } else if (p.indexOf(h) === 0) {
    return '~' + path.sep + p.substring(h.length + 1);
  }
{'fraction_non_alphanumeric': 0.16363636363636364, 'fraction_numerical': 0.003896103896103896, 'mean_word_length': 3.7857142857142856, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7577949', 'n_tokens_mistral': 556, 'n_tokens_neox': 552, 'n_words': 154}