MilesChou / imgecho

Inline Images Protocol implementation for PHP.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Imgecho

tests codecov Codacy Badge Latest Stable Version Total Downloads License

Echo the image on iTerm App using Inline Images Protocol.

Installation

Use Composer to install.

composer require mileschou/imgecho

Usage

Use the fluent API to build your control code. Following is example:

$uri = 'https://chart.apis.google.com/chart?cht=lc&chs=450x200&chd=t:70,72,67,68,65,59,64,70,73,75,78,80&chxt=x,y&chxl=0:|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec&chg=10,20';

$resolver = static function () use ($uri) {
    return file_get_contents($uri);
};

$echoer = new MilesChou\ImgEcho\ImgEcho();
$echoer->withName('basic');

$echoer->withImage($resolver);
$echoer->send();

About

Inline Images Protocol implementation for PHP.

License:MIT License


Languages

Language:PHP 91.6%Language:Makefile 8.4%