File tree Expand file tree Collapse file tree 3 files changed +65
-3
lines changed
src/main/java/info/unterrainer/commons/parentpom Expand file tree Collapse file tree 3 files changed +65
-3
lines changed Original file line number Diff line number Diff line change
1
+ ![ GitHub forks] ( https://img.shields.io/github/forks/UnterrainerInformatik/java-cli-utils?style=social ) ![ GitHub stars] ( https://img.shields.io/github/stars/UnterrainerInformatik/java-cli-utils?style=social ) ![ GitHub repo size] ( https://img.shields.io/github/repo-size/UnterrainerInformatik/java-cli-utils ) [ ![ GitHub issues] ( https://img.shields.io/github/issues/UnterrainerInformatik/java-cli-utils )] ( https://github.com/UnterrainerInformatik/java-cli-utils/issues )
2
+
3
+ [ ![ license] ( https://img.shields.io/github/license/unterrainerinformatik/FiniteStateMachine.svg?maxAge=2592000 )] ( http://unlicense.org ) [ ![ Travis-build] ( https://travis-ci.org/UnterrainerInformatik/java-cli-utils.svg?branch=master )] ( https://travis-ci.org/github/UnterrainerInformatik/java-cli-utils ) [ ![ Maven Central] ( https://img.shields.io/maven-central/v/info.unterrainer.commons/cli-utils )] ( https://search.maven.org/artifact/info.unterrainer.commons/cli-utils ) [ ![ Twitter Follow] ( https://img.shields.io/twitter/follow/throbax.svg?style=social&label=Follow&maxAge=2592000 )] ( https://twitter.com/throbax )
4
+
5
+
6
+
1
7
# java-cli-utils
2
8
A collection of useful tools if you want to make a command line interface of some sorts.
3
9
10
+ ## Console-Progressbar
11
+
12
+ The console-progressbar is designed to show progress when writing long-running console-applications.
13
+ It was designed to be used with consoles that support control-characters (like cmd) or that don't (Eclipse console implementation before Mars (4.5)).
14
+
15
+ It comes with three flavors:
16
+
17
+ #### SimpleInsertBar
18
+
19
+ Works with non-control-character enabled consoles.
20
+ Uses a completely new line for adding progress-characters instead.
21
+
22
+ ``` java
23
+ prefix: [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ]
24
+ ##################################################
25
+ ```
26
+
27
+ #### ProgressBar
28
+
29
+ Your ASCII-progressbar.
30
+ Uses the same line, requiring ASCII escape characters.
31
+
32
+ ``` java
33
+ prefix: [########------------------------------------------ ]
34
+ ```
35
+
36
+ #### PercentGauge
37
+
38
+ Displays the percentage.
39
+ Needs ASCII escape characters as well.
40
+
41
+ ``` java
42
+ prefix: [ 72 % ]
43
+ ```
44
+
45
+
46
+
47
+ You may extend the visual representations by implementing new graphical variants.
48
+
49
+ ### Example
50
+
51
+ ``` java
52
+ ConsoleProgressBar bar = ConsoleProgressBar . builder(). maxValue((double )list. size()).
53
+ controlCharacterSupport(! isForFileOut). build();
54
+
55
+ int count = 0 ;
56
+ for (String s : list) {
57
+ doSomething(s);
58
+
59
+ bar. updateValue(++ count). redraw(System . out);
60
+ }
61
+
62
+ bar. complete(). redraw(System . out);
63
+ System . out. println(" \n " );
64
+ ```
65
+
4
66
## CliParser
5
67
6
68
This is a fluent wrapper over the Apache Commons CLI library.
Original file line number Diff line number Diff line change 10
10
11
11
<modelVersion >4.0.0</modelVersion >
12
12
<artifactId >cli-utils</artifactId >
13
- <version >0.2.6 </version >
13
+ <version >0.2.7 </version >
14
14
<name >CliUtils</name >
15
15
<packaging >jar</packaging >
16
16
Original file line number Diff line number Diff line change 2
2
3
3
public class Information {
4
4
public static final String name = "Parent-POM" ;
5
- public static final String buildTime = "2020-12-13T21:48:13Z " ;
6
- public static final String pomVersion = "0.2.6 " ;
5
+ public static final String buildTime = "2020-12-29T15:08:05Z " ;
6
+ public static final String pomVersion = "0.2.7 " ;
7
7
}
You can’t perform that action at this time.
0 commit comments