/props2yaml

Convert `.properties` files into `.yaml`

Primary LanguagePythonMIT LicenseMIT

props2yaml

Convert .properties files into .yaml

install

pip install -U props2yaml
props2yaml --version

cli usage

  •  props2yaml config.properties -o config.yml          # (1)
  •  props2yaml config.properties > config.yml           # (2)
  •  cat config.properties | props2yaml -o config.yml    # (3)
  •  cat config.properties | props2yaml > config.yml     # (4)

python usage

from props2yaml import convert_properties_to_yaml

converted = convert_properties_to_yaml("config.prop.value=50")
print(converted)

output:

config:
  prop:
    value: '50'