-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmarcli.php
51 lines (40 loc) · 1.66 KB
/
marcli.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare( strict_types = 1 );
if ( version_compare( phpversion(), '7.0', '<' ) ) {
die( 'This script needs at least PHP version 7.0! (Running on PHP ' . phpversion() .' now.)' . "\n" );
}
// @see: http://www.patorjk.com/software/taag/#f=Elite&t=MarCLI
define( 'MARCLI_BANNER', "\e[33m
• ▌ ▄ ·. ▄▄▄· ▄▄▄ ▄▄· ▄▄▌ ▪
·██ ▐███▪▐█ ▀█ ▀▄ █·▐█ ▌▪██• ██
▐█ ▌▐▌▐█·▄█▀▀█ ▐▀▀▄ ██ ▄▄██▪ ▐█·
██ ██▌▐█▌▐█ ▪▐▌▐█•█▌▐███▌▐█▌▐▌▐█▌
▀▀ █▪▀▀▀ ▀ ▀ .▀ ▀·▀▀▀ .▀▀▀ ▀▀▀\e[0m\e[32m
\e[32m▪▪▪▪ \e[37mMARC Command Line Tools\e[32m ▪▪▪▪\e[0m
" );
require_once __DIR__ . '/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Umlts\Marcli\CountCommand;
use Umlts\Marcli\DumpCommand;
use Umlts\Marcli\SplitCommand;
use Umlts\Marcli\LintCommand;
use Umlts\Marcli\FindCommand;
use Umlts\Marcli\ReplaceCommand;
use Umlts\Marcli\DuplicatesCommand;
use Umlts\Marcli\MapWriteCommand;
use Umlts\Marcli\MapReadCommand;
use Umlts\Marcli\BoolAndCommand;
use Umlts\Marcli\BoolNotCommand;
$app = new Application( MARCLI_BANNER, '@package_version@' );
$app->add( new CountCommand() );
$app->add( new DumpCommand() );
$app->add( new SplitCommand() );
$app->add( new LintCommand() );
$app->add( new FindCommand() );
$app->add( new ReplaceCommand() );
$app->add( new DuplicatesCommand() );
$app->add( new MapWriteCommand() );
$app->add( new MapReadCommand() );
$app->add( new BoolAndCommand() );
$app->add( new BoolNotCommand() );
$app->run();