<commit_before><?php
/**
 * @package    CleverStyle CMS
 * @subpackage Builder
 * @author     <NAME> <<EMAIL>>
 * @copyright  Copyright (c) 2011-2015, <NAME>
 * @license    MIT License, see license.txt
 */
if (!Phar::canWrite()) {
	echo "CleverStyle CMS Builder can't work, set, please, \"phar.readonly=off\" option in \"php.ini\"";
	return;
}
define('DIR', __DIR__);
require_once DIR.'/build/Builder.php';
require_once DIR.'/core/thirdparty/nazarpc/BananaHTML.php';
require_once DIR.'/core/classes/h/Base.php';
require_once DIR.'/core/classes/h.php';
require_once DIR.'/core/thirdparty/upf.php';
require_once DIR.'/core/functions.php';
time_limit_pause();
date_default_timezone_set('UTC');
header('Content-Type: text/html; charset=utf-8');
header('Connection: close');
$Builder = new cs\Builder(DIR, DIR);
$mode    = 'form';
$cli     = PHP_SAPI == 'cli';
if ($cli) {
	$modules = [];
	$plugins = [];
	$themes  = [];
	$suffix  = null;
	for ($i = 1; $i < $argc; $i += 2) {
		switch ($argv[$i]) {
			case '-h':
				$mode = 'form';
				break;
			case '-M':
				$mode = $argv[$i + 1];
				break;
			case '-m':
				$modules = explode(',', $argv[$i + 1]);
				break;
			case '-p':
				$plugins = explode(',', $argv[$i + 1]);
				break;
			case '-t':
				$themes = explode(',', $argv[$i + 1]);
				break;
			case '-s':
				$suffix = $argv[$i + 1];
				break;
		}
	}
	switch ($mode) {
		case 'form':
			echo 'CleverStyle CMS builder
Builder is used for creating distributive of the CleverStyle CMS and its components.
Usage: php build.php [-h] [-M <mode>] [-m <module>] [-p <plugin>] [-t <theme>] [-s <suffix>]
  -h - This information
  -M - Mode of builder, can be one of: core, module, plugin, theme
  -m - One or more modules names separated by coma
       If mode is "core" - specified modules will be included into system distributive
       If mode is module - distributive of each module will be created
       In other modes ignored
  -p - One or more plugins names separated by coma
       If mode is "core" - specified plugins will be included into system distributive
       If mode is plugin - distributive of each plugin will be created
       In other modes ignored
  -t - One or more themes names separated by coma
       If mode is "core" - specified themes will be included into system distributive
       If mode is theme - distributive each each theme will be created
       In other modes ignored
  -s - Suffix for distributive
Example:
  php build.php -M core
  php build.php -M core -m Plupload,Static_pages
  php build.php -M core -p TinyMCE -t DarkEnergy -s custom
  php build.php -M module -m Plupload,Static_pages
';
			break;
		case 'core':
			echo $Builder->core($modules, $plugins, $themes, $suffix)."\n";
			break;<commit_msg>Long keys support for builder<commit_after><?php
/**
 * @package    CleverStyle CMS
 * @subpackage Builder
 * @author     <NAME> <<EMAIL>>
 * @copyright  Copyright (c) 2011-2015, <NAME>
 * @license    MIT License, see license.txt
 */
if (!Phar::canWrite()) {
	echo "CleverStyle CMS Builder can't work, set, please, \"phar.readonly=off\" option in \"php.ini\"";
	return;
}
define('DIR', __DIR__);
require_once DIR.'/build/Builder.php';
require_once DIR.'/core/thirdparty/nazarpc/BananaHTML.php';
require_once DIR.'/core/classes/h/Base.php';
require_once DIR.'/core/classes/h.php';
require_once DIR.'/core/thirdparty/upf.php';
require_once DIR.'/core/functions.php';
time_limit_pause();
date_default_timezone_set('UTC');
header('Content-Type: text/html; charset=utf-8');
header('Connection: close');
$Builder = new cs\Builder(DIR, DIR);
$mode    = 'form';
$cli     = PHP_SAPI == 'cli';
if ($cli) {
	$modules = [];
	$plugins = [];
	$themes  = [];
	$suffix  = null;
	for ($i = 1; $i < $argc; $i += 2) {
		switch ($argv[$i]) {
			case '-h':
			case '--help':
				$mode = 'form';
				break;
			case '-M':
			case '--mode':
				$mode = $argv[$i + 1];
				break;
			case '-m':
			case '--modules':
				$modules = explode(',', $argv[$i + 1]);
				break;
			case '-p':
			case '--plugins':
				$plugins = explode(',', $argv[$i + 1]);
				break;
			case '-t':
			case '--themes':
				$themes = explode(',', $argv[$i + 1]);
				break;
			case '-s':
			case '--suffix':
				$suffix = $argv[$i + 1];
				break;
		}
	}
	switch ($mode) {
		case 'form':
			echo 'CleverStyle CMS builder
Builder is used for creating distributive of the CleverStyle CMS and its components.
Usage: php build.php [-h] [-M <mode>] [-m <module>] [-p <plugin>] [-t <theme>] [-s <suffix>]
  -h
  --help    - This information
  -M
  --mode    - Mode of builder, can be one of: core, module, plugin, theme
  -m
  --modules - One or more modules names separated by coma
       If mode is "core" - specified modules will be included into system distributive
       If mode is module - distributive of each module will be created
       In other modes ignored
  -p
  --plugins - One or more plugins names separated by coma
       If mode is "core" - specified plugins will be included into system distributive
       If mode is plugin - distributive of each plugin will be created
       In other modes ignored
  -t
  --themes  - One or more themes names separated by coma
       If mode is "core" - specified themes will be included into system distributive
       If mode is theme - distributive each each theme will be created
       In other modes ignored
  -s
  --suffix  - Suffix for distributive
Example:
  php build.php -M core
  php build.php -M core -m Plupload,Static_pages
  php build.php -M core -p TinyMCE -t DarkEnergy -s custom
  php build.php -M module -m Plupload,Static_pages
';
			break;
		case 'core':
			echo $Builder->core($modules, $plugins, $themes, $suffix)."\n";
			break;
{'fraction_non_alphanumeric': 0.14947368421052631, 'fraction_numerical': 0.005614035087719298, 'mean_word_length': 3.034677990092003, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 23, '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': '4372020', 'n_tokens_mistral': 2079, 'n_tokens_neox': 1855, 'n_words': 653}