Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gromnitsky/sh-progress-reporter
A simple progress reporter for sh scripts
https://github.com/gromnitsky/sh-progress-reporter
Last synced: about 6 hours ago
JSON representation
A simple progress reporter for sh scripts
- Host: GitHub
- URL: https://github.com/gromnitsky/sh-progress-reporter
- Owner: gromnitsky
- Created: 2013-08-19T14:43:08.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T18:33:03.000Z (about 5 years ago)
- Last Synced: 2023-04-10T15:02:57.120Z (over 1 year ago)
- Language: Shell
- Homepage:
- Size: 5.72 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A simple progress reporter for sh scripts
JFF.
Clone the repo & run `example-simple.sh`. It'll display something like
Converting: 11%
and then (on the same line):
Converting: ok
(It actually doesn't convert anything.)
## API
. ./progress_reporter.sh
progress_reporter_begin 'Some boring, long task: '
pr=`progress_reporter_new 0 331`
for i in `seq 0 331`; do
progress_reporter_update $pr $i
done
progress_reporter_end 'ok'## Requirements
* /bin/sh in FreeBSD or bash in Fedora.
* expr, seq, gawk.## ffmpeg
For a more useful example, see `example-ffmpeg.sh`--a drop-in wrapper
around ffmpeg (tested w/ 4.1.4). The script passes down all CLAs to
ffmpeg, but hides all the garbage it prints. The only thing a user
sees is:ffmpeg (foobar.m4a): 19%
![gif](http://sigwait.tk/~alex/demo/misc/example-ffmpeg.sh.gif)
## TODO
- shunit2 tests but today (2013-08-19) is a lazy August day;
## License
MIT.