All Projects â†’ alecrabbit â†’ Php Console Spinner

alecrabbit / Php Console Spinner

Licence: mit
Colorful highly configurable spinner for php cli applications (suitable for async apps)

Projects that are alternatives of or similar to Php Console Spinner

Yaspin
A lightweight terminal spinner for Python with safe pipes and redirects 🎁
Stars: ✭ 413 (+83.56%)
Mutual labels:  cli, terminal, console, spinner
Box Cli Maker
Make Highly Customized Boxes for your CLI
Stars: ✭ 115 (-48.89%)
Mutual labels:  cli, terminal, console, color
Chalk
🖍 Terminal string styling done right
Stars: ✭ 17,566 (+7707.11%)
Mutual labels:  cli, terminal, console, color
Crossline
A small, self-contained, zero-config, MIT licensed, cross-platform, readline and libedit replacement.
Stars: ✭ 53 (-76.44%)
Mutual labels:  cli, terminal, console, color
Php Watcher
Monitor for any changes in your php application and automatically restart it (suitable for async apps).
Stars: ✭ 303 (+34.67%)
Mutual labels:  cli, async, asynchronous, reactphp
Rang
A Minimal, Header only Modern c++ library for terminal goodies 💄✨
Stars: ✭ 1,080 (+380%)
Mutual labels:  cli, terminal, console, color
Ascii
👾 ASCII Roulette :: ascii art video chat on the cli
Stars: ✭ 202 (-10.22%)
Mutual labels:  cli, terminal, console
Eazydict
įŽ€å•æ˜“į”¨įš„å‘Ŋäģ¤čĄŒč¯å…¸ 📕 📙 📗 📘 📓
Stars: ✭ 92 (-59.11%)
Mutual labels:  cli, terminal, console
Tooling
Advancing Node.js as a framework for writing great tools
Stars: ✭ 98 (-56.44%)
Mutual labels:  cli, terminal, console
Spinner
Go (golang) package with 90 configurable terminal spinner/progress indicators.
Stars: ✭ 1,637 (+627.56%)
Mutual labels:  cli, terminal, spinner
Word Wrap
Wrap words to a specified length.
Stars: ✭ 107 (-52.44%)
Mutual labels:  cli, terminal, console
Chalk Animation
đŸŽŦ Colorful animations in terminal output
Stars: ✭ 1,489 (+561.78%)
Mutual labels:  terminal, console, color
Mpb
multi progress bar for Go cli applications
Stars: ✭ 1,221 (+442.67%)
Mutual labels:  cli, terminal, spinner
Window Size
Reliable way to to get the height and width of the terminal/console in a node.js environment.
Stars: ✭ 79 (-64.89%)
Mutual labels:  cli, terminal, console
.tmux
đŸ‡Ģ🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤ī¸
Stars: ✭ 15,594 (+6830.67%)
Mutual labels:  cli, terminal, console
Xa
Beautiful & Customizable logger ❤ī¸
Stars: ✭ 78 (-65.33%)
Mutual labels:  cli, terminal, color
Taskline
Tasks, boards & notes for the command-line habitat
Stars: ✭ 78 (-65.33%)
Mutual labels:  cli, terminal, console
Galacritty
WIP GTK terminal emulator based on Alacritty
Stars: ✭ 136 (-39.56%)
Mutual labels:  cli, terminal, console
Nnn
nÂŗ The unorthodox terminal file manager
Stars: ✭ 13,138 (+5739.11%)
Mutual labels:  cli, terminal, console
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (-23.11%)
Mutual labels:  cli, terminal, console

Logo

Spinner - your task is running

đŸĩī¸ PHP Console Spinner

PHP Version Build Status Appveyor Status Scrutinizer Code Quality Code Coverage Total Downloads

Latest Stable Version Packagist Pre Release Version Latest Unstable Version

License Average time to resolve an issue Percentage of issues still open

advanced

⚠ī¸ Compatibility issues

Update 2019-Nov-01: As of version 0.53 compatibility issues should be resolved, but it needs to be tested.

This project is still in its active development phase. It turned out that some of its indirect dependencies are causing compatibility issues. New release is expected to be ready in mid-november 2019. For now, as a solution, you can use lightweight spinner alecrabbit/php-cli-snake.

Feature comparision

Feature php-console-spinner php-cli-snake
Lightweight ❌ ī¸ ✔ī¸
Has zero dependencies ❌ ī¸ ✔ī¸
Highly configurable ✔ī¸ ī¸ ❌
Contains various spinner classes ✔ī¸ ī¸ ❌
Progress indicator ✔ī¸ ī¸ ❌
Messages indicator ✔ī¸ ī¸ ❌
Color settings for spinner ✔ī¸ ī¸ ❌
Color settings for messages ✔ī¸ ī¸ ❌
Color settings for progress indicator ✔ī¸ ī¸ ❌
Has disable() method ✔ī¸ ī¸ ❌
Has enable() method ✔ī¸ ī¸ ❌
Can show final message ✔ī¸ ī¸ ❌
Cursor hide can be disabled ✔ī¸ ī¸ ❌
Can use optional custom output ✔ī¸ ī¸ ❌
Has erase() method ✔ī¸ ī¸ ✔ī¸ ī¸
Hides cursor with $spinner->begin() ✔ī¸ ī¸ ✔ī¸ ī¸
Shows cursor with $spinner->end() ✔ī¸ ī¸ ✔ī¸ ī¸
Supports piping ✔ī¸ ī¸ ✔ī¸ ī¸
Supports redirect ✔ī¸ ī¸ ✔ī¸ ī¸
Supports no color mode ✔ī¸ ī¸ ✔ī¸ ī¸
Supports 16 color mode ✔ī¸ ī¸ ✔ī¸ ī¸
Supports 256 color mode ✔ī¸ ī¸ ✔ī¸ ī¸

Features

  • progress indication during spin $spinner->progress(0.5) ➙ 50%
  • messages during spin $spinner->message('message')
  • separated color settings for spinner, messages and progress indicator
  • has disable() and enable() methods
  • hides cursor on $spinner->begin(), shows on $spinner->end()
  • cursor hide can be disabled $settings->setHideCursor(false)
  • has erase() method
  • final message $spinner->end('final message')
  • supports unix pipe | and redirect > output
  • supplied with SymfonyOutputAdapter::class

Quickstart

Simple

See simple.php

require_once __DIR__ . '/vendor/autoload.php';

use AlecRabbit\Spinner\SnakeSpinner;

const ITERATIONS = 50;

$spinner = new SnakeSpinner();

$spinner->begin();
for ($i = 0; $i <= ITERATIONS; $i++) {
    usleep(80000); // Simulating work
    $spinner->spin();
}
$spinner->end();

Advanced (ReactPHP)

See advanced.php, async.demo.php

require_once __DIR__ . '/../vendor/autoload.php';

use AlecRabbit\Spinner\BlockSpinner;
use React\EventLoop\Factory;

$s = new BlockSpinner();

$loop = Factory::create();

$loop->addPeriodicTimer($s->interval(), static function () use ($s) {
    $s->spin();
});

$s->begin();

$loop->run();

Installation

composer require alecrabbit/php-console-spinner

Usage

Spinners

Here you can find a list of all spinners with demos

Operating Systems

  • Developed and tested on Ubuntu 18.04 (xterm terminal)

  • On Windows it should work in any VT100 terminal, e.g. minTTY.

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].