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

8
src/release/txt.py

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

Loading…
Cancel
Save