1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mautrix_signal_ynh.git synced 2024-09-03 19:46:07 +02:00
mautrix_signal_ynh/scripts/yaml2json.py

19 lines
234 B
Python
Raw Normal View History

#!/usr/bin/python
# Usage: yaml2json.py <file>
import sys
import yaml
import json
assert len(sys.argv) == 2, "Expected a file as argument"
with open(sys.argv[1], "r") as f:
y = yaml.safe_load(f)
j = json.dumps(y)
print(j)