Skip to content
/ caser Public

A small command line utility for formatting multiword string keys, and a demo of packaging w/ java

License

Notifications You must be signed in to change notification settings

atl-tw/caser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Caser

Purpose

This is a small command line utility that converts between different string formats.

caser
Usage: caser [options] String values to convert
  Options:
    /?, --help
      Show help
      Default: false
  * -i, --input-format
      Input format.
      Possible Values: [lower-hyphen, lowerCamel, UpperCamel, UPPER-HYPHEN, lower_snake, UPPER_SNAKE, lower.dotted, UPPER.DOTTED, java.Type]
  * -o, --output-format
      Output format.
      Possible Values: [lower-hyphen, lowerCamel, UpperCamel, UPPER-HYPHEN, lower_snake, UPPER_SNAKE, lower.dotted, UPPER.DOTTED, java.Type]

caser -i lower.dotted -o UPPER_SNAKE  this.is.an.example 
THIS_IS_AN_EXAMPLE

More than that, this is a study in various ways to package a Java project for distribution with maven.

The outputs of this build include:

  • A shaded JAR file that can be run with java -jar
  • Zip and TGZ assembly of a distribution suitable for any OS.
  • A Windows installer built with Nullsoft Scriptable Install System
  • A native binary build with GraalVM's native-image
  • A Homebrew formula for Mac (Published to a Tap with GHA)
  • The usual Maven repository suspects (Published to a repo with GHA)

Installation:

You can find binaries for Windows, Mac, and Linux (for Intel) on the Releases page.

For Mac you can also install via Homebrew:

brew tap atl-tw/tap
brew insall caser

Build Tools:

Mac:

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdkman env
brew install makensis 

Build

Build platform agnostic:

./mvnw install

Build native image:

./mvnw -Pnative -Dagent=true install