PHP Classes

File: bin/generate

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   PHP GitHub Readme Generator   bin/generate   Download  
File: bin/generate
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP GitHub Readme Generator
Generate Markdown files to describe projects
Author: By
Last change:
Date: 1 year ago
Size: 752 bytes
 

Contents

Class file image Download
#!/usr/bin/env php

<?php
/**
 * Copyright (c) Pierre-Henry Soria <hi@ph7.me>
 * MIT License - https://opensource.org/licenses/MIT
 */

define('ROOT_DIR', dirname(__DIR__, 1) . DIRECTORY_SEPARATOR);
define('APP_NAME', 'README File Generator');
define('APP_VERSION', '1.0.0');

require
ROOT_DIR . '/vendor/autoload.php';

use
Monolog\{Handler\StreamHandler, Logger};
use
PH7\PhpReadmeGeneratorFile\Command\Markdown\{GeneratorCommand, Information};
use
Symfony\Component\Console\Application;

$logger = new Logger('ReadmeGenerator');
$logger->pushHandler(new StreamHandler('php://stdout', Logger::DEBUG));

$app = new Application(
   
APP_NAME,
   
APP_VERSION
);

$commands = [
    new
GeneratorCommand()
];

$app->addCommands($commands);

$app->run();