Convert .properties
files into .yaml
pip install -U props2yaml
props2yaml --version
-
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)
from props2yaml import convert_properties_to_yaml
converted = convert_properties_to_yaml("config.prop.value=50")
print(converted)
output:
config:
prop:
value: '50'