21 lines
737 B
Python
21 lines
737 B
Python
import zipfile
|
|
|
|
base = r'e:\MCStudioDownload\work\3027246179@qq.com\Cpp\AddOn\309c2d420bc84ee986db9cdd070ff02a\_sa_hanhua_out'
|
|
jars = {
|
|
'essentials': base + r'\sa_essentials-forge-1.20.1-1.0.0.jar',
|
|
'lib': base + r'\sa_lib-forge-1.20.1-1.0.1.jar',
|
|
'decor': base + r'\sa_decor-forge-1.20.1-1.0.3.jar',
|
|
}
|
|
|
|
for name, jar in jars.items():
|
|
print('='*30, name, '='*30)
|
|
with zipfile.ZipFile(jar) as z:
|
|
if 'META-INF/mods.toml' in z.namelist():
|
|
print(z.read('META-INF/mods.toml').decode('utf-8'))
|
|
else:
|
|
for n in z.namelist():
|
|
if n.endswith('mods.toml'):
|
|
print('found:', n)
|
|
print(z.read(n).decode('utf-8'))
|
|
print()
|