Added ANSI parsers and rendering ANSI frames
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Classes\Frame;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Classes\Frame as AbstractFrame;
|
||||
use App\Classes\Parser\Ansi as AnsiParser;
|
||||
|
||||
class Ansi extends AbstractFrame
|
||||
{
|
||||
@@ -18,9 +19,21 @@ class Ansi extends AbstractFrame
|
||||
|
||||
public static $if_filler = '.';
|
||||
|
||||
public function fields($startline=0)
|
||||
public function __construct(\App\Models\Frame $o,string $msg='')
|
||||
{
|
||||
$this->output .= str_replace(LF,CR.LF,$this->frame->content);
|
||||
parent::__construct($o);
|
||||
|
||||
// If we have a message to display on the bottom line.
|
||||
if ($msg)
|
||||
$this->output .= ESC.'[24;0f'.$msg.HOME;
|
||||
}
|
||||
|
||||
public function fields($startline=1)
|
||||
{
|
||||
$o = new AnsiParser($this->frame->content,$startline);
|
||||
$this->output .= (string)$o;
|
||||
|
||||
$this->fields = $o->fields;
|
||||
}
|
||||
|
||||
public function strlenv($text):int {
|
||||
|
Reference in New Issue
Block a user