Browse Source

perf: release framework

master
Dnomd343 2 years ago
parent
commit
e4898d0fbf
  1. 5
      src/release/common.py
  2. 8
      src/release/txt.py

5
src/release/common.py

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import os
import sys
import json
rootPath = os.path.join(
@ -20,3 +21,7 @@ def loadData(jsonName: str) -> dict:
'metadata': metadata,
'content': content,
}
if __name__ == '__main__':
print(loadData(sys.argv[1]))

8
src/release/txt.py

@ -1,6 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from common import loadData
@ -25,7 +26,6 @@ def txtRelease(metadata: dict, content: dict) -> str:
return '\n\n\n'.join(result)
data = loadData('rc-4')
print(
txtRelease(data['metadata'], data['content'])
)
if __name__ == '__main__':
data = loadData(sys.argv[1])
print(txtRelease(data['metadata'], data['content']))

Loading…
Cancel
Save