From 85aef3d99708eccb0c4a17ff6ab50baf49b9656f Mon Sep 17 00:00:00 2001 From: wowlikon Date: Thu, 18 Sep 2025 10:54:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=D0=B0=20=D0=B8?= =?UTF-8?q?=D0=BD=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=86=D0=B8=D0=B8=20=D0=BE?= =?UTF-8?q?=20=D0=B2=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=82=D1=87=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.json | 18 +++++++++++++++++- main.py | 24 +++++++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index e9b81e4..bcf3991 100644 --- a/config.json +++ b/config.json @@ -11,9 +11,11 @@ }, "patches": { "package_name": { + "enabled": true, "new_package_name": "com.wowlikon.anixart" }, "compress": { + "enabled": true, "remove_language_files": true, "remove_AI_voiceover": true, "remove_debug_lines": true, @@ -23,9 +25,11 @@ "compress_png_files": true }, "change_server": { + "enabled": false, "server": "https://anixarty.wowlikon.tech/modding" }, "color_theme": { + "enabled": true, "colors": { "primary": "#ccff00", "secondary": "#ffffd700", @@ -39,12 +43,24 @@ } }, "replace_navbar": { + "enabled": true, "items": ["home", "discover", "feed", "bookmarks", "profile"] }, "custom_speed": { - "speeds": [9.0] + "enabled": true, + "speeds": [0.0] + }, + "disable_ad": { + "enabled": true + }, + "disable_beta_banner": { + "enabled": true + }, + "insert_new": { + "enabled": true }, "settings_urls": { + "enabled": true, "menu": { "Мы в социальных сетях": [ { diff --git a/main.py b/main.py index 1cf940c..6cfa7b5 100644 --- a/main.py +++ b/main.py @@ -112,6 +112,28 @@ def init(): raise typer.Exit(1) +# ======================= INFO ========================= +@app.command() +def info(patch_name: str = ""): + """Вывод информации о патче""" + conf = load_config().model_dump() + if patch_name: + patch = Patch(patch_name, __import__(f"patcher.patches.{patch_name}")) + console.print(f"[green]Информация о патче {patch.name}:") + console.print(f" [yellow]Приоритет: {patch.priority}") + console.print(f" [yellow]Описание: {patch.module.__doc__}") + else: + console.print("[cyan]Список патчей:") + for f in PATCHES.glob("*.py"): + if f.name.startswith("todo_") or f.name == "__init__.py": + continue + name = f.stem + if conf['patches'].get(name,{}).get('enabled',True): + console.print(f" [yellow]{name}: [green]✔ enabled") + else: + console.print(f" [yellow]{name}: [red]✘ disabled") + + # ======================= PATCHING ========================= class Patch: def __init__(self, name: str, module): @@ -232,7 +254,7 @@ def build( continue name = f.stem settings = patch_settings.get(name, {}) - if not settings.get("enable", True): + if not settings.get("enabled", True): console.print(f"[yellow]≫ Пропускаем {name}") continue module = importlib.import_module(f"patches.{name}")