diff --git a/src/release/to-json.py b/src/release/to-json.py new file mode 100644 index 0000000..147d057 --- /dev/null +++ b/src/release/to-json.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +import sys +import json +from common import loadData + + +def jsonRelease(metadata: dict, content: dict) -> str: + return json.dumps( + { + 'metadata': metadata, + 'content': content, + }, separators = (',', ':') + ) + + +if __name__ == '__main__': + data = loadData(sys.argv[1]) + print(jsonRelease(data['metadata'], data['content'])) diff --git a/src/release/txt.py b/src/release/to-txt.py similarity index 100% rename from src/release/txt.py rename to src/release/to-txt.py