All Projects → kotet → progress

kotet / progress

Licence: other
Easy progress reporting for D

Programming Languages

d
599 projects
shell
77523 projects

Projects that are alternatives of or similar to progress

Ng Http Loader
🍡 Smart angular HTTP interceptor - Intercepts automagically HTTP requests and shows a spinkit spinner / loader / progress bar
Stars: ✭ 327 (+1535%)
Mutual labels:  progress-bar, spinner
Android Spinkit
Android loading animations
Stars: ✭ 8,096 (+40380%)
Mutual labels:  progress-bar, spinner
Progress bar
Command-line progress bars and spinners for Elixir.
Stars: ✭ 281 (+1305%)
Mutual labels:  progress-bar, spinner
Spinner
Go (golang) package with 90 configurable terminal spinner/progress indicators.
Stars: ✭ 1,637 (+8085%)
Mutual labels:  progress-bar, spinner
Vue Wait
Complex Loader and Progress Management for Vue/Vuex and Nuxt Applications
Stars: ✭ 1,869 (+9245%)
Mutual labels:  progress-bar, spinner
Mpb
multi progress bar for Go cli applications
Stars: ✭ 1,221 (+6005%)
Mutual labels:  progress-bar, spinner
Ngx Ui Loader
Multiple Loaders / spinners and Progress bar for Angular 5, 6, 7 and 8+
Stars: ✭ 368 (+1740%)
Mutual labels:  progress-bar, spinner
Alive Progress
A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
Stars: ✭ 2,940 (+14600%)
Mutual labels:  progress-bar, spinner
React Native Loading Spinner Overlay
💈 React Native loading spinner overlay
Stars: ✭ 1,369 (+6745%)
Mutual labels:  progress-bar, spinner
Yurnalist
An elegant console reporter, borrowed from Yarn
Stars: ✭ 88 (+340%)
Mutual labels:  progress-bar, spinner
React Nprogress
⌛️ A React primitive for building slim progress bars.
Stars: ✭ 173 (+765%)
Mutual labels:  progress-bar, spinner
ConsoleTools
A set of tools and "controls" for the .net Console.
Stars: ✭ 67 (+235%)
Mutual labels:  progress-bar, spinner
angular-progress-bar
This component allow you to easy incorporate progress-bar to angular/ionic project, providing binding and color options
Stars: ✭ 26 (+30%)
Mutual labels:  progress-bar
anikimiapi
A Simple, LightWeight, Statically-Typed Python3 API wrapper for GogoAnime.
Stars: ✭ 15 (-25%)
Mutual labels:  dub
pbapply
Adding progress bar to '*apply' functions in R
Stars: ✭ 115 (+475%)
Mutual labels:  progress-bar
material-circular-loader
Material Circular Loader in SCSS like a boss. Demo: http://codepen.io/YuRen/details/KdKKax
Stars: ✭ 13 (-35%)
Mutual labels:  spinner
ffmpeg-progressbar-cli
A colored progress bar for FFmpeg.
Stars: ✭ 140 (+600%)
Mutual labels:  progress-bar
uldaq
MCC Universal Library for Linux
Stars: ✭ 70 (+250%)
Mutual labels:  counter
Social-Media-Monitor
Automatically monitor and log fan counters from social media(Facebook Pages, Twitter, Instagram, YouTube, Google+, OneSignal, Alexa) using APIs to Google Spreadsheet. Very useful for website admins and social media managers.
Stars: ✭ 36 (+80%)
Mutual labels:  counter
sosoito
Progress layout collection for Android
Stars: ✭ 14 (-30%)
Mutual labels:  progress-bar

progress

Build Status Dub version Go to progress LICENSE

Easy progress reporting for D inspired by Python's one with the same name.
There are 6 progress bar, 4 spinner, 4 counter, and... Dman.

Progress bar

  • Bar
  • ChargingBar
  • FillingSquaresBar
  • FillingCirclesBar
  • IncrementalBat
  • ShadyBar

Spinner

  • Spinner
  • PieSpinner
  • MoonSpinner
  • LineSpinner

Counter

  • Counter
  • Countdown
  • Stack
  • Pie

Dman

  • DmanSpinner

Usage

progress bars

Call next to advance and finish to finish.

Bar b = new Bar();
b.message = {return "Processing";};
b.max = 20;
foreach(i; 0 .. 20)
{
    //Do some work
    b.next();
}
b.finish();
Processing |##################              | 12/20

In the general case, you can use the iter method to write simply

import std.range : iter;

Bar b = new Bar();
foreach(i; b.iter(iota(20)) )
{
    //Do something
}

Progress bars are very customizable, you can change their width, their fill character, their suffix and more.

import std.conv : to;

b.message = {return "Loading";};
b.fill = '@';
b.suffix = {return b.percent.to!string ~ "%";};

This will produce a bar like the following:

Loading |@@@@@@@                         | 24%

There are various properties that can be used in message and suffix.

name type value
index size_t current value
max size_t maximum value
remaining size_t max - index
progress real index / max
percent real progress * 100
avg Duration simple moving average time per item
elapsed Duration elapsed time in seconds
eta Duration avg * remaining

Instead of passing all configuration options on instatiation, you can create your custom subclass:

class CustomBar : Bar
{
    this()
    {
        super();
        bar_prefix = "/";
        bar_suffix = "/";
        empty_fill = " ";
        fill = "/";
        suffix = {return "Custom";};
    }

You can also override any of the arguments or create your own:

class SlowBar : Bar
{
    this()
    {
        super();
        suffix = {return this.remaining_hours.to!string ~ "hours remaining";};
    }
    @property long remaining_hours()
    {
        return this.eta.total!"hours";
    }
}

Spinners

For actions with an unknown number of steps you can use a spinner:

import progress.spinner;

auto s = new Spinner();
s.message = {return "Loading";};
while (finished != true)
{
    //Do something
    s.next();
}

Counters

Counters can be used like progress bar.
However, Counter is the same as spinners, and has no properties that require maximum value.

Dman

Same as spinners. it's very big.


Please see example projects and source if you want to learn more.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].