Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2023-07-12 (2 months ago) | | Not enough user ratings | | Total: 25 This week: 1 | | All time: 10,965 This week: 108 |
|
Description | | Author |
This package can display bars for in-progress console tasks.
It can output characters to the console terminal on which a PHP script runs to show the progress of executing tasks.
The package can show multiple progress bars in the same terminal console at the same time in fixed positions. Innovation Award
July 2023
Number 4 |
Some developers created PHP scripts and tools to execute useful tasks from the command line terminal console.
Some of those scripts and tools need to execute tasks that may take a long time to finish.
In that case, it is useful to let the user know how much each task was executed.
This package can show multiple bars to show the progress of each running task.
This possibility is useful to show the detailed progress of complex tasks split into multiple levels of sub-tasks.
Manuel Lemos |
| |
|
|
Innovation award
Nominee: 3x |
|
Details
Description
This is a simple wrapper around iterable variable with zero dependencies that uses generator to display progress in cli
Installation
composer require nikop/progress
Usage
<?php
use Progress\Progress;
require __DIR__.'/../vendor/autoload.php';
foreach (Progress::wrap(range(1, 4)) as $number) {
foreach (Progress::wrap(range(1, 5),'Second') as $secondNumber) {
foreach (Progress::wrap(range(1, 6), 'Third') as $thirdNumber) {
{
usleep(20000);
}
}
}
}
Result
![](./examples/demo.gif)
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.