Initial commit
This commit is contained in:
parent
056360adf6
commit
7fd5bbe3c7
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +1,4 @@
|
|||||||
venv\
|
venv
|
||||||
.idea\
|
.idea
|
||||||
|
|
||||||
*.jar
|
*.jar
|
23
GlowstoneBlock.py
Normal file
23
GlowstoneBlock.py
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import zipfile
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
def get_mod_info(target_file):
|
||||||
|
with zipfile.ZipFile(target_file) as z:
|
||||||
|
return json.loads(z.read('mcmod.info'))[0]
|
||||||
|
|
||||||
|
|
||||||
|
def get_modpack_info(target_dir):
|
||||||
|
for f in os.scandir(target_dir):
|
||||||
|
if f.is_file():
|
||||||
|
if '.jar' in f.name.lower():
|
||||||
|
yield get_mod_info(f.path)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
x
Reference in New Issue
Block a user