Skip to content

Super simple library for live-updating php-cli script progress output with estimated time that is left.

License

Notifications You must be signed in to change notification settings

tinyappsde/script-progress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script Progress

This is a super simple library for php-cli script progress output. It’s easy-to-use and can print the estimated time that is left until your script is done. You always know if your script is still doing something or might be stuck – and when it will approximately finish.

Example output: 20% done. Appr. 02m 16s remaining. – That’s it.

Installation

composer require tinyapps/script-progress

Example Usage

$numberOfItems = 20;
$progress = new TinyApps\ScriptProgress\Progress($numberOfItems);

for ($i=0; $i <= $numberOfItems; $i++) {
    // do something
    $progress->update($i);
}

There is also an example in the corresponding folder.

More features will be added soon.

About

Super simple library for live-updating php-cli script progress output with estimated time that is left.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages