nowise/uup-progressbar

Progress bar for CLI applications

1.0.0 2022-01-31 16:17 UTC

This package is auto-updated.

Last update: 2024-04-29 04:46:24 UTC


README

Progress bar for console (CLI) applications.

$progress = new ProgressBar();

for ($i = 1; $i <= 100; ++$i) {
    $progress->addIncrement($i);
}

Displays percentage completed, spinner and progress bar. An optional message can also be passed for each tick.

68% [\] ==============       : Importing file5483.txt

The start-/end-values are can be chosen as likes. Custom labels are displayed when increment value equals the start- or end-value:

0% [*] Waiting...
100% [+] Finished!

The length of the progress bar and indicator character can also be customized.