https://github.com/tinyappsde/script-progress
Super simple library for live-updating php-cli script progress output with estimated time that is left.
https://github.com/tinyappsde/script-progress
Last synced: 5 months ago
JSON representation
Super simple library for live-updating php-cli script progress output with estimated time that is left.
- Host: GitHub
- URL: https://github.com/tinyappsde/script-progress
- Owner: tinyappsde
- License: mit
- Created: 2021-02-19T01:37:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-16T12:32:17.000Z (over 4 years ago)
- Last Synced: 2025-08-12T15:47:00.114Z (11 months ago)
- Language: PHP
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```php
$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.