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}")