<commit_before><?php
/**
 * Lithium: the most rad php framework
 *
 * @copyright     Copyright 2010, Union of RAD (http://union-of-rad.org)
 * @license       http://opensource.org/licenses/bsd-license.php The BSD License
 */

use \lithium\console\Dispatcher as ConsoleDispatcher;
use \lithium\util\String;

ConsoleDispatcher::applyFilter('_call', function($self, $params, $chain) {
	$params['callable']->response->applyFilter('output', function($self, $params, $chain) {	
		if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
		    $colors = array(
				'black' => '', 'red' => '', 'green' => '', 'yellow' => '',
				'blue' => '', 'purple' => '', 'cyan' => '', 'white' => '', 
				'end' => ''
			);
		} else {
			$colors = array(
				'black'  => "\033[0;30m",
				'red'    => "\033[0;31m",
				'green'  => "\033[0;32m",
				'yellow' => "\033[0;33m",
				'blue'   => "\033[0;34m",
				'purple' => "\033[0;35m",
				'cyan'   => "\033[0;36m",
				'white'  => "\033[0;37m",
				'end'    => "\033[0m",
			);
		}
		$params['string'] = String::insert($params['string'], $colors);
		return $chain->next($self, $params, $chain);
	}); 
	return $chain->next($self, $params, $chain);
});<commit_msg>Adding style names to color listings.<commit_after><?php
/**
 * Lithium: the most rad php framework
 *
 * @copyright     Copyright 2010, Union of RAD (http://union-of-rad.org)
 * @license       http://opensource.org/licenses/bsd-license.php The BSD License
 */

use \lithium\console\Dispatcher as ConsoleDispatcher;
use \lithium\util\String;

ConsoleDispatcher::applyFilter('_call', function($self, $params, $chain) {
	$params['callable']->response->applyFilter('output', function($self, $params, $chain) {	
		$styles = array(
			/** General **/
			'heading1' => "\033[1;36m",
			'heading2' => "\033[1;34m",
			'heading3' => "\033[1;35m",
			'option'   => "\033[1;33m",
			'command'  => "\033[1;32m",
			/** Colors **/
			'black'  => "\033[0;30m",
			'red'    => "\033[0;31m",
			'green'  => "\033[0;32m",
			'yellow' => "\033[0;33m",
			'blue'   => "\033[0;34m",
			'purple' => "\033[0;35m",
			'cyan'   => "\033[0;36m",
			'white'  => "\033[0;37m",
			'end'    => "\033[0m",
		);
		if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
			array_walk($styles, function(&$value, $key) {
				$value = '';
			});
		}
		$params['string'] = String::insert($params['string'], $styles);
		return $chain->next($self, $params, $chain);
	}); 
	return $chain->next($self, $params, $chain);
});
{'fraction_non_alphanumeric': 0.2492894843686561, 'fraction_numerical': 0.060495330897279743, 'mean_word_length': 3.4963503649635035, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, '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': '5264006', 'n_tokens_mistral': 1125, 'n_tokens_neox': 932, 'n_words': 171}