forked from FurnaceTool/ArmorExtract
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextract.py
More file actions
21 lines (18 loc) · 679 Bytes
/
extract.py
File metadata and controls
21 lines (18 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from extracts.itemsadder import ItemsAdder
from extracts.nexo import Nexo
from utils.loader import Loader
from utils.utils import Utils
import sys, os
if os.path.exists(".env"):
import dotenv
dotenv.load_dotenv()
Utils.clear_old_convert("ItemsAdder", "Nexo", "output")
try:
Loader.load(os.getenv("input_content"))
if all(os.path.exists(path) for path in ("ItemsAdder/contents", "ItemsAdder/storage/items_ids_cache.yml")):
ItemsAdder().extract()
if all(os.path.exists(path) for path in ("Nexo/items", "Nexo/pack/pack.zip")):
Nexo().extract()
print("Done")
except Exception as e:
sys.exit(f"\033[31mError:\033[0m \033[90m{e}\033[0m")