antivoland / console-progress-bar

The simplest console-based progress bar for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Console progress bar

build publish

The simplest console-based progress bar with non-blocking interface for Java.

Animated preview

Installation

Use the following Maven dependency:

<dependency>
    <groupId>io.github.antivoland</groupId>
    <artifactId>console-progress-bar</artifactId>
    <version>1.1.0-SNAPSHOT</version>
</dependency>

Currently only snapshots are available, so you will need to add the repository to your project as follows:

<repositories>
    <repository>
        <id>ossrh</id>
        <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>

Usage

try (ConsoleProgressBar bar = new ConsoleProgressBar(someMax)) {
    some loop {
        // do some business
        bar.step(); // step by 1
        bar.stepBy(someDelta); // step by someDelta
    }
}

About

The simplest console-based progress bar for Java

License:MIT License


Languages

Language:Java 100.0%