Initial commit

This commit is contained in:
harmacist 2021-03-26 23:54:34 -05:00
parent 056360adf6
commit 7fd5bbe3c7
2 changed files with 25 additions and 2 deletions

4
.gitignore vendored
View File

@ -1,4 +1,4 @@
venv\ venv
.idea\ .idea
*.jar *.jar

23
GlowstoneBlock.py Normal file
View 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()