1
0
Fork 0
mirror of https://github.com/Radiquum/anixart-patcher.git synced 2025-09-06 11:13:51 +05:00

refactor: tqdm -> rich.progress

This commit is contained in:
Kentai Radiquum 2025-09-02 08:47:52 +05:00
parent 43b1406b4a
commit 7b5ba163bd
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
10 changed files with 260 additions and 141 deletions

View file

@ -30,18 +30,31 @@ class ConfigFolders(TypedDict):
dist: str
class ConfigXmlNS(TypedDict):
android: str
app: str
class Config(TypedDict):
log_level: str
tools: list[ConfigTools]
folders: ConfigFolders
xml_ns: ConfigXmlNS
def load_config() -> Config:
config = None
if not os.path.exists("config.json"):
log.exception("file `config.json` is not found!")
exit(1)
with open("./config.json", "r", encoding="utf-8") as file:
return json.loads(file.read())
config = json.loads(file.read())
log.setLevel(config.get("log_level", "NOTSET").upper())
return config
config = load_config()