Skip to content

Commit

Permalink
Added -z command line switch to disable colorized output
Browse files Browse the repository at this point in the history
  • Loading branch information
frossm committed Dec 21, 2020
1 parent 10a1f17 commit da3a508
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Note that if Quoter has been installed via a snap, `quoter -c` is all that is ne
|-s | Save the securities provided into the preferences system to be executed each time Quoter is run. If a `-d` Detailed or `-t` Trend is requested, the saved securities will be included. If a symbol is added on the command line it will be shown along with those that are saved. If `-s` is provided and there are already saved securities, the current list will overwrite the old list |
|-r | Remove saved securities. If you'd like them back you'll need to re-save them |
|-i | Ignore saved queries for this execution. They will remain saved |
|-z | Disable colorized output|

#### Security Information
|Option|Description|
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.fross</groupId>
<artifactId>quoter</artifactId>
<version>2.2.0</version>
<version>2.3.0</version>
<packaging>jar</packaging>

<name>quoter</name>
Expand Down Expand Up @@ -176,7 +176,7 @@
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>2.0.1</version>
<version>2.1.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
Expand All @@ -190,7 +190,7 @@
<dependency>
<groupId>org.fross</groupId>
<artifactId>library</artifactId>
<version>2.0.3</version>
<version>2020.12.21</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: quoter
version: '2.2.0'
version: '2.3.0'
summary: Command line utility to pull stock and index quotes
description: |
Quote fetches stock quotes and index data from IEXCloud.IO.
Expand All @@ -20,7 +20,7 @@ parts:
plugin: maven
source: https://github.com/frossm/library.git
source-type: git
source-tag: 'v2.0.3'
source-tag: 'v2020.12.21'
maven-options: [install]

quoter:
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/fross/quoter/Help.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public static void Display() {
Output.printColorln(Ansi.Color.WHITE, " -s Save securities as default and show them automatically");
Output.printColorln(Ansi.Color.WHITE, " -r Remove saved securities");
Output.printColorln(Ansi.Color.WHITE, " -i Ignore saved queries for this execution only");

Output.printColorln(Ansi.Color.WHITE, " -z Disable colorized output");

Output.printColorln(Ansi.Color.YELLOW, "\nSecurity Information:");
Output.printColorln(Ansi.Color.WHITE, " -d Display more detailed security information");
Output.printColorln(Ansi.Color.WHITE, " -t Include a 3 month historical trend");
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/org/fross/quoter/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void main(String[] args) {
}

// Process Command Line Options
Getopt optG = new Getopt("quote", args, "ckdtx:sriDvh?");
Getopt optG = new Getopt("quote", args, "ckdtx:sriDvzh?");
while ((optionEntry = optG.getopt()) != -1) {
switch (optionEntry) {
// Turn on Debug Mode
Expand Down Expand Up @@ -141,6 +141,11 @@ public static void main(String[] args) {
Output.println(COPYRIGHT);
System.exit(0);
break;

// Disable colorized output
case 'z':
Output.setColor(false);
break;

// Access in program help
case '?':
Expand Down

0 comments on commit da3a508

Please sign in to comment.