Terminal drawing with braille

Overview

php-drawille

Terminal drawing with braille.

Octocat example

Requirements

php-drawille requires PHP 5.4.0 or later.

Installation

The recommended way to install php-drawille is through composer. Just create a composer.json file and run the php composer.phar install command to install it:

{
    "require": {
        "whatthejeff/drawille": "~1.0"
    }
}

Usage

use Drawille\Canvas;

$canvas = new Canvas();

for($x = 0; $x <= 1800; $x += 10) {
    $canvas->set($x / 10, 10 + sin($x * M_PI / 180) * 10);
}

echo $canvas->frame(), "\n";

Usage example

use Drawille\Turtle;

$turtle = new Turtle();

for($x = 0; $x < 36; $x++) {
    $turtle->right(10);

    for($y = 0; $y < 36; $y++) {
        $turtle->right(10);
        $turtle->forward(8);
    }
}

echo $turtle->frame(), "\n";

Turtle example

Examples

To use the scripts in the examples directory, you need to install the dependencies with composer.

$ cd examples
$ php composer.phar install
$ ./img2term.php --fab --threshold 600 ~/Pictures/sb.png

img2term example

Tests

Build Status

To run the test suite, you need composer.

$ php composer.phar install
$ vendor/bin/phpunit

Acknowledgements

php-drawille is a port of drawille.

License

php-drawille is licensed under the MIT license.

You might also like...
Php Debugger to run in terminal to debug your code easily.
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source lib to make a debug in php direct in terminal, without necessary configure an IDE. Th

Render the symfony profiler toolbar in your terminal.
Render the symfony profiler toolbar in your terminal.

sourceability/console-toolbar-bundle Render the symfony profiler toolbar in your terminal. Each panel links to the corresponding web profiler page.

PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal.
PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal.

PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal. 🚀

Render colored  Markdown contents on console terminal
Render colored Markdown contents on console terminal

cli-markdown Render colored markdown contents on console terminal Preview run demo by php example/demo.php Features support auto render color on termi

Highlight PHP code in terminal
Highlight PHP code in terminal

PHP Console Highlighter This repository is abandoned. Suggested alternative: https://github.com/php-parallel-lint/PHP-Console-Highlighter Highlight PH

Run the following commands in your terminal to setup the project

Run the following commands in your terminal to setup the project You must have the LAMP installed on your system git clone https://github.com/Bashar-A

I gues i tried to make a shell that's looks like a terminal in single php file
I gues i tried to make a shell that's looks like a terminal in single php file

php-shell-gui Terms of service This tool can only be used for legal purposes. You take full responsibility for any actions performed using this. The o

tin is a PHP code highlighter for the terminal.
tin is a PHP code highlighter for the terminal.

tin tin is a PHP code highlighter for the terminal. Installation Requires PHP 8.0.0+ You can install the package via composer: composer require felixd

Php Debugger to run in terminal to debug your code easily.
Php Debugger to run in terminal to debug your code easily.

What is Dephpugger? Dephpugger (read depugger) is an open source library that allows a developer to debug in php direct in terminal, without necessary

Hentai Bash - This is the core of Hentai Terminal, responsible for the basic functions and commands
Hentai Bash - This is the core of Hentai Terminal, responsible for the basic functions and commands

Hentai Bash - This is the core of Hentai Terminal, responsible for the basic functions and commands. It is mainly used for writing and executing commands.

Terminal management system.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Terminal management system.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Highlight PHP code in terminal
Highlight PHP code in terminal

PHP Console Highlighter Highlight PHP code in console (terminal). Example Install Just run the following command to install it: composer require --dev

Detection of execution by command (Terminal) or web environment.
Detection of execution by command (Terminal) or web environment.

WEB-CLI-Detector Detection of execution by command (Terminal) or web environment. Acronym: [WEB-CLI-Detector]. Name: WEB-CLI-Detector. Dependencies: S

Create a simple todo-list application with the basic PHP programming language implemented in the terminal
Create a simple todo-list application with the basic PHP programming language implemented in the terminal

PHP-DASAR---simple-todo-list-app-with-terminal create a simple todo-list application with the basic PHP programming language implemented in the termin

TraceX-GUI is a GUI based IP atrcker tool for terminal user
TraceX-GUI is a GUI based IP atrcker tool for terminal user

TraceX-GUI Author Alex Butler (MrHacker-X) What is IP Tracing? As IP addresses are automatically identified thanks to the handshake, IP address tracke

Owner
Jeff Welch
Jeff Welch
Highlight PHP code in terminal

PHP Console Highlighter This repository is abandoned. Suggested alternative: https://github.com/php-parallel-lint/PHP-Console-Highlighter Highlight PH

Jakub Onderka 6.2k Dec 22, 2022
Run the following commands in your terminal to setup the project

Run the following commands in your terminal to setup the project You must have the LAMP installed on your system git clone https://github.com/Bashar-A

null 1 Nov 6, 2021
Terminal management system.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

HISTYLE 3 Sep 5, 2022
Terminal management system.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

HISTYLE 2 May 14, 2022
Highlight PHP code in terminal

PHP Console Highlighter Highlight PHP code in console (terminal). Example Install Just run the following command to install it: composer require --dev

PHP Parallel lint 74 Dec 12, 2022
Detection of execution by command (Terminal) or web environment.

WEB-CLI-Detector Detection of execution by command (Terminal) or web environment. Acronym: [WEB-CLI-Detector]. Name: WEB-CLI-Detector. Dependencies: S

Walter Nuñez 4 Jul 13, 2022
TraceX-GUI is a GUI based IP atrcker tool for terminal user

TraceX-GUI Author Alex Butler (MrHacker-X) What is IP Tracing? As IP addresses are automatically identified thanks to the handshake, IP address tracke

Alex Butler 10 Dec 26, 2022
Rah terminal - A terminal for Textpattern CMS

rah_terminal Twitter | GitHub | Donate Rah_terminal is a plugin for Textpattern CMS. It provides a terminal emulator interface for executing external

Jukka Svahn 2 Apr 17, 2022
It is an open-source and free project, which is faced with the drawing lovers, providing a free and simple Gallery service

It is an open-source and free project, which is faced with the drawing lovers, providing a free and simple Gallery service

WeepingDogel 5 Dec 15, 2022
PHP's best friend for the terminal.

Running PHP from the command line? CLImate is your new best bud. CLImate allows you to easily output colored text, special formats, and more. Installa

The League of Extraordinary Packages 1.8k Dec 30, 2022