19 lines
377 B
Python
19 lines
377 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
import os
|
|
import sys
|
|
|
|
from config_model import load_config
|
|
|
|
|
|
def main() -> int:
|
|
path = sys.argv[1] if len(sys.argv) > 1 else os.getenv("CONFIG_PATH", "config.json")
|
|
config = load_config(path)
|
|
json.dump(config, sys.stdout, indent=2)
|
|
sys.stdout.write("\n")
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|