<commit_before><?php

namespace SunChaser\WP2MD\cli;

use SunChaser\WP2MD\Converter;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class Convert extends Command
{
    protected function configure()
    {
        $this->setName('convert');
        $this->setDescription('Convert WordPress Plugin readme file to Markdown');
        $this->addOption('input',  'i', InputOption::VALUE_REQUIRED, 'WordPress Plugin readme.txt');
        $this->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Markdown file');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        /** @var \Symfony\Component\Console\Helper\FormatterHelper $formatter */
        //$formatter = $this->getHelperSet()->get('formatter');

        $readme = $input->getOption('input');
        if ($readme === null) {
            $readme = 'php://stdin';
        } elseif (is_file($readme) === false || is_readable($readme) === false) {
            $output->writeln('<error>You should specify a readable readme file</error>');
            die();
        }

        $readmeData = file_get_contents($readme);

        $markdownData = Converter::Convert($readmeData);

        $markdown = $input->getOption('output');
        if ($markdown) {
            file_put_contents($markdown, $markdownData);
        } else {
            $output->writeln($markdownData, OutputInterface::OUTPUT_RAW);
        }
    }
} <commit_msg>no need for formatter<commit_after><?php

namespace SunChaser\WP2MD\cli;

use SunChaser\WP2MD\Converter;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

class Convert extends Command
{
    protected function configure()
    {
        $this->setName('convert');
        $this->setDescription('Convert WordPress Plugin readme file to Markdown');
        $this->addOption('input',  'i', InputOption::VALUE_REQUIRED, 'WordPress Plugin readme.txt');
        $this->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Markdown file');
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $readme = $input->getOption('input');
        if ($readme === null) {
            $readme = 'php://stdin';
        } elseif (is_file($readme) === false || is_readable($readme) === false) {
            $output->writeln('<error>You should specify a readable readme file</error>');
            die();
        }

        $readmeData = file_get_contents($readme);

        $markdownData = Converter::Convert($readmeData);

        $markdown = $input->getOption('output');
        if ($markdown) {
            file_put_contents($markdown, $markdownData);
        } else {
            $output->writeln($markdownData, OutputInterface::OUTPUT_RAW);
        }
    }
} 
{'fraction_non_alphanumeric': 0.142668428005284, 'fraction_numerical': 0.001321003963011889, 'mean_word_length': 3.242296918767507, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 25, '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': '4184611', 'n_tokens_mistral': 879, 'n_tokens_neox': 852, 'n_words': 164}