37 lines
596 B
PHP
37 lines
596 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Console\Commands\BBS;
|
||
|
|
||
|
use Illuminate\Console\Command;
|
||
|
|
||
|
use App\Classes\ANSI;
|
||
|
|
||
|
class ANSIDecode extends Command
|
||
|
{
|
||
|
/**
|
||
|
* The name and signature of the console command.
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $signature = 'bbs:ansi:decode'
|
||
|
.' {file : ANS file to decode}';
|
||
|
|
||
|
/**
|
||
|
* The console command description.
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
protected $description = 'Decode ANS file from custom binary';
|
||
|
|
||
|
/**
|
||
|
* Execute the console command.
|
||
|
*
|
||
|
* @return int
|
||
|
*/
|
||
|
public function handle(): int
|
||
|
{
|
||
|
echo ANSI::ansi($this->argument('file'));
|
||
|
|
||
|
return self::SUCCESS;
|
||
|
}
|
||
|
}
|