1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 05:08:19 +08:00

Chore: Re-arrange requirements list

This commit is contained in:
LmeSzinc
2024-04-23 00:58:29 +08:00
parent 41075b4a52
commit ccf51f6829
7 changed files with 127 additions and 80 deletions

View File

@@ -10,6 +10,8 @@ def read_file(file):
out = {}
with open(file, 'r', encoding='utf-8') as f:
for line in f.readlines():
if not line.strip():
continue
res = [s.strip() for s in line.split('==')]
if len(res) > 1:
name, version = res
@@ -29,7 +31,9 @@ def write_file(file, data):
lines.append(str(name))
with open(file, 'w', encoding='utf-8', newline='') as f:
f.write('\n'.join(lines))
text = '\n'.join(lines)
text = text.replace('#', '\n#').strip()
f.write(text)
def docker_requirements_generate(requirements_in='requirements-in.txt'):