mileschou / imgecho
Inline Images Protocol implementation for PHP.
v0.1.0
2021-10-12 15:37 UTC
Requires
- php: ^7.1 | ^8.0
Requires (Dev)
- phpunit/phpunit: ^7.5 | ^8.5 | ^9.3
- squizlabs/php_codesniffer: ^3.6
This package is auto-updated.
Last update: 2024-10-12 22:12:46 UTC
README
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();