Skip to content

Commit

Permalink
Dependency updates. Updated screenshot.
Browse files Browse the repository at this point in the history
Also cleaned up the code a small bit, added comments, etc.
  • Loading branch information
frossm committed Sep 27, 2022
1 parent bea33a3 commit f0d399f
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
Binary file modified graphics/SnapShot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.fross</groupId>
<artifactId>cal</artifactId>
<version>2.4.1</version>
<version>2.4.2</version>
<packaging>jar</packaging>

<name>cal</name>
Expand Down Expand Up @@ -197,14 +197,14 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0</version>
<version>5.9.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.fross</groupId>
<artifactId>library</artifactId>
<version>2022.07.28</version>
<version>2022.09.07</version>
</dependency>
</dependencies>

Expand Down
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: fcal
version: '2.4.1'
version: '2.4.2'
summary: Command line calendar display
description: |
fCal is a command line calendar utility. It will display a
Expand All @@ -24,7 +24,7 @@ parts:
plugin: maven
source: https://github.com/frossm/library.git
source-type: git
source-tag: 'v2022.07.28'
source-tag: 'v2022.09.07'
maven-options: [install]

cal:
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/fross/cal/Calendar.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@

public class Calendar {
// Class Constants
static final int DEFAULT_CALS_PER_ROW = 3;
static final int CALENDARWIDTH = 20;
static final int SPACESBETWEENCALS = 2;
static final String[] MONTHLIST = { "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November",
static protected final int DEFAULT_CALS_PER_ROW = 3;
static protected final int CALENDARWIDTH = 20;
static protected final int SPACESBETWEENCALS = 2;
static protected final String[] MONTHLIST = { "", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November",
"December" };
static final Color TODAYHIGHLIGHT_FG = Ansi.Color.WHITE;
static final Color TODAYHIGHLIGHT_BG = Ansi.Color.BLUE;
static protected final Color TODAYHIGHLIGHT_FG = Ansi.Color.WHITE;
static protected final Color TODAYHIGHLIGHT_BG = Ansi.Color.BLUE;

// Class Variables
static int calsPerRow = DEFAULT_CALS_PER_ROW;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/fross/cal/CommandLineArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ public static void ProcessCommandLine(String[] argv) {
// Process the parsed command line options
// ---------------------------------------------------------------------------------------------
// Debug Switch
if (cli.clDebug == true)
if (cli.clDebug == true) {
Debug.enable();
}

// Set the stack name and restore stack from Preferences
if (cli.clNum != Calendar.DEFAULT_CALS_PER_ROW) {
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/fross/cal/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,13 @@ public static void main(String[] args) {
// Display the calendars
Output.println("");
switch (CommandLineArgs.cli.clMonthAndOrYear.size()) {

// No month or year provided
case 0:
Calendar.printYear(CommandLineArgs.queryMonthToUse(), CommandLineArgs.queryYearToUse());
break;

// A month or year was given. Assume it's a month if it's 1-12
case 1:
if (Integer.parseInt(CommandLineArgs.cli.clMonthAndOrYear.get(0)) > 12) {
Calendar.printYear(CommandLineArgs.queryMonthToUse(), CommandLineArgs.queryYearToUse());
Expand All @@ -109,6 +112,7 @@ public static void main(String[] args) {
}
break;

// A month and a year was provided
case 2:
Calendar.printMonth(CommandLineArgs.queryMonthToUse(), CommandLineArgs.queryYearToUse());
break;
Expand Down

0 comments on commit f0d399f

Please sign in to comment.