<commit_before><?php
    /**
     * Comando de de creación de estructura de document root
     */
    use Symfony\Component\Console\Input\InputArgument;
    use Symfony\Component\Console\Input\InputInterface;
    use Symfony\Component\Console\Output\OutputInterface;

    if (!isset($console)) $console = new Application();
    $console
        ->register('psfs:create:root')
        ->setDefinition(array(
            new InputArgument('path', InputArgument::OPTIONAL, 'Path en el que crear el Document Root'),
        ))
        ->setDescription('Comando de creación del Document Root del projecto')
        ->setCode(function(InputInterface $input, OutputInterface $output) {
            $path = $input->getArgument('path');
            if (empty($path)) $path = BASE_DIR.DIRECTORY_SEPARATOR.'html';
            \PSFS\base\config\Config::createDir($path);
            $paths = array("js", "css", "img", "media", "font");
            foreach ($paths as $htmlPath) {
                \PSFS\base\config\Config::createDir($path.DIRECTORY_SEPARATOR.$htmlPath);
            }
            $files = [
                '_' => '_.php',
                'browserconfig' => 'browserconfig.xml',
                'crossdomain' => 'crossdomain.xml',
                'humans' => 'humans.txt',
                'robots' => 'robots.txt',
            ];
            foreach ($files as $templates => $filename) {
                $text = \PSFS\base\Template::getInstance()->dump("generator/html/". $templates . '.html.twig');
                if(false === file_put_contents($path . DIRECTORY_SEPARATOR . $filename, $text)) {
                    $output->writeln('Can\t create the file ' . $filename);
                } else {
                    $output->writeln($filename . ' created successfully');
                }
            }
            $output->writeln("Document root generado en ".$path);
        })
    ;<commit_msg>Creation of locale un the generation command<commit_after><?php
    /**
     * Comando de de creación de estructura de document root
     */
    use Symfony\Component\Console\Input\InputArgument;
    use Symfony\Component\Console\Input\InputInterface;
    use Symfony\Component\Console\Output\OutputInterface;

    if (!isset($console)) $console = new Application();
    $console
        ->register('psfs:create:root')
        ->setDefinition(array(
            new InputArgument('path', InputArgument::OPTIONAL, 'Path en el que crear el Document Root'),
        ))
        ->setDescription('Comando de creación del Document Root del projecto')
        ->setCode(function(InputInterface $input, OutputInterface $output) {
            // Creates the html path
            $path = $input->getArgument('path');
            if (empty($path)) $path = WEB_DIR;
            \PSFS\base\config\Config::createDir($path);
            $paths = array("js", "css", "img", "media", "font");
            foreach ($paths as $htmlPath) {
                \PSFS\base\config\Config::createDir($path.DIRECTORY_SEPARATOR.$htmlPath);
            }

            // Generates the root needed files
            $files = [
                '_' => '_.php',
                'browserconfig' => 'browserconfig.xml',
                'crossdomain' => 'crossdomain.xml',
                'humans' => 'humans.txt',
                'robots' => 'robots.txt',
            ];
            foreach ($files as $templates => $filename) {
                $text = \PSFS\base\Template::getInstance()->dump("generator/html/". $templates . '.html.twig');
                if(false === file_put_contents($path . DIRECTORY_SEPARATOR . $filename, $text)) {
                    $output->writeln('Can\t create the file ' . $filename);
                } else {
                    $output->writeln($filename . ' created successfully');
                }
            }

            //Export base locale translations
            if(!file_exists(BASE_DIR.DIRECTORY_SEPARATOR.'locale')) {
                \PSFS\base\config\Config::createDir(BASE_DIR.DIRECTORY_SEPARATOR.'locale');
                \PSFS\Services\GeneratorService::copyr(SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'locale', BASE_DIR . DIRECTORY_SEPARATOR . 'locale');
            }

            $output->writeln("Document root generado en ".$path);
        })
    ;
{'fraction_non_alphanumeric': 0.1409270906126252, 'fraction_numerical': 0.0, 'mean_word_length': 2.045390070921986, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5609967', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1140, 'n_words': 234}