Skip to content

Commit

Permalink
Updated libraries & tweaked visual outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
frossm committed Mar 1, 2022
1 parent 5d57da5 commit c234302
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
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.7.15</version>
<version>2.7.16</version>
<packaging>jar</packaging>

<name>quoter</name>
Expand Down Expand Up @@ -180,14 +180,14 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.8</version>
<version>2.9.0</version>
</dependency>

<!-- Fross library functions: https://github.com/frossm/library -->
<dependency>
<groupId>org.fross</groupId>
<artifactId>library</artifactId>
<version>2021.07.21</version>
<version>2021.10.24</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.7.15'
version: '2.7.16'
summary: Command line utility to pull stock and index quotes
description: |
Quote fetches stock quotes and index data from IEXCloud.IO.
Expand All @@ -23,7 +23,7 @@ parts:
plugin: maven
source: https://github.com/frossm/library.git
source-type: git
source-tag: 'v2021.07.21'
source-tag: 'v2021.10.24'
maven-options: [install]

quoter:
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/fross/quoter/HistoricalQuotes.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public static void displayTrendingMap(String symb, String token) {
int titleSpaces1 = (graphWidth / 2) - sv.toString().length() - (int) midNumber.length() / 2;
int titleSpaces2 = graphWidth - sv.toString().length() - titleSpaces1 - lv.toString().length() - lv.toString().length();

Output.printColorln(Ansi.Color.CYAN, " ".repeat(12) + sv + " ".repeat(titleSpaces1) + midNumber + " ".repeat(titleSpaces2) + lv);
Output.printColorln(Ansi.Color.WHITE, " ".repeat(12) + sv + " ".repeat(titleSpaces1) + midNumber + " ".repeat(titleSpaces2) + lv);
Output.printColor(Ansi.Color.CYAN, " ".repeat(11) + "+" + "-".repeat(graphWidth / 2) + "+" + "-".repeat(graphWidth / 2) + "+");
Output.printColorln(Ansi.Color.WHITE, " Low" + " ".repeat(lengthOfCurrentPrice - 1) + "Close" + " ".repeat(lengthOfCurrentPrice - 3) + "High");

Expand Down Expand Up @@ -230,7 +230,7 @@ public static void displayTrendingMap(String symb, String token) {

// Display the Footer
Output.printColorln(Ansi.Color.CYAN, " ".repeat(11) + "+" + "-".repeat(graphWidth / 2) + "+" + "-".repeat(graphWidth / 2) + "+");
Output.printColorln(Ansi.Color.CYAN, " ".repeat(12) + sv + " ".repeat(titleSpaces1) + midNumber + " ".repeat(titleSpaces2) + lv + "\n\n");
Output.printColorln(Ansi.Color.WHITE, " ".repeat(12) + sv + " ".repeat(titleSpaces1) + midNumber + " ".repeat(titleSpaces2) + lv + "\n\n");
}

}
8 changes: 3 additions & 5 deletions src/main/java/org/fross/quoter/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,12 @@ public static void main(String[] args) {
long creditLimit = Long.parseLong(metaData.get("creditLimit").substring(0, metaData.get("creditLimit").indexOf('.')).strip());
double creditUsedPercentage = ((double) creditsUsed / creditLimit) * 100;

Output.printColor(Ansi.Color.WHITE, "Credit Used Percentage:");
Output.printColorln(Ansi.Color.YELLOW, String.format("%10.2f%%", creditUsedPercentage));

Output.printColor(Ansi.Color.WHITE, "Current Credits Used:");
Output.printColorln(Ansi.Color.YELLOW, String.format("%13s", Format.Comma(creditsUsed)));
Output.printColor(Ansi.Color.YELLOW, String.format("%8s", Format.Comma(creditsUsed)));
Output.printColorln(Ansi.Color.YELLOW, " / " + String.format("%3.2f%%", creditUsedPercentage));

Output.printColor(Ansi.Color.WHITE, "Total Monthly Credits:");
Output.printColorln(Ansi.Color.YELLOW, String.format("%12s", Format.Comma(creditLimit)));
Output.printColorln(Ansi.Color.YELLOW, String.format("%9s", Format.Comma(creditLimit)));

} catch (Exception ex) {
Output.fatalError("Could not display IEXCloud credit usage", 4);
Expand Down

0 comments on commit c234302

Please sign in to comment.