Categorygithub.com/dschanoeh/props
modulepackage
1.0.0
Repository: https://github.com/dschanoeh/props.git
Documentation: pkg.go.dev

# README

props

Tests License Docker Image Size (latest semver)

props is a command line interface to interact with Java .properties files. These files aren't as easy to parse as it seems at first sight (see the format section for an example).

Therefore, props utilizes the magiconair/properties library for proper parsing and provides a thin command line interface wrapper.

There are also the following GitHub Actions that wrap props for use in GitHub workflows:

Features

  • Extract a property value from a file
  • Replace a property value in a file
  • Create the properties file if it doesn't exist
  • Support for UTF-8 (default) or ISO-8859-1/Latin1 encoding. Note that ISO-8859-1 is used by Java < 9 and UTF-8 is used by default in Java >= 9
  • File-based processing or STDIN/STDOUT

Example Usage

Reading a property:

% cat my.properties
foo=bar
% props read foo --file my.properties
bar
%

Writing a property

% cat my.properties
foo=bar
foo2=bar
% props write foo2 baz --file my.properties
% cat my.properties
foo = bar
foo2 = baz

# Packages

No description provided by the author