ProgressBar is a C library for displaying attractive progress bars on the command line. It's heavily influenced by the ruby ProgressBar gem, whose api and behaviour it imitates.
#include "progressbar.h"
int main()
{
progressbar *progress = progressbar_new("Loading", 100);
for(int i=0; i < 100; i++)
{
// Do some stuff
progressbar_inc(progress);
}
progressbar_finish(progress);
return 0;
}
Example output from test/demo.c
:
We provide a conda distribution of progressbar under conda-forge channel:
conda install -c conda-forge c-progressbar
On Linux or macOS systems it can be as simple as
bash <(curl -fsSL https://raw.githubusercontent.com/limix/progressbar/master/install)
assuming that you have ncurses
library installed and that cmake
managed to find it.
On Windows systems you might want to have a look at the
msys2 project first.
It provides Unix-like environment making it easier to install, use, build and
port software on Windows.
In particular, it can be used to install gcc
, ncurses
, and cmake
:
pacman -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-ncurses ^
mingw-w64-x86_64-cmake
Now from progressbar
source directory, proceed with
mkdir build
cd build
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release --target install
If you encounter any issue, please, submit it. Suggestions and ideas are also welcome.
- Danilo Horta - https://github.com/horta
- Johannes Buchner - https://github.com/JohannesBuchner
- Mariano Anaya - https://github.com/rmariano
- Trevor Fountain - https://github.com/doches
This project is licensed under the MIT License - see the LICENSE file for details