refactor: implement Mobileraker and OctoEverywhere as community extensions (#532)

* refactor: move mobileraker to extensions

Signed-off-by: Dominik Willner <th33xitus@gmail.com>

* refactor: move octoeverywhere to extensions

Signed-off-by: Dominik Willner <th33xitus@gmail.com>

---------

Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
dw-0
2024-09-20 12:05:29 +02:00
committed by GitHub
parent 29b5ab00cd
commit 7e87f8af32
23 changed files with 445 additions and 486 deletions

View File

@@ -12,11 +12,11 @@ import tempfile
from pathlib import Path
from typing import List, Tuple
from core.instance_type import InstanceType
from core.logger import Logger
from core.submodules.simple_config_parser.src.simple_config_parser.simple_config_parser import (
SimpleConfigParser,
)
from utils.instance_type import InstanceType
ConfigOption = Tuple[str, str]

View File

@@ -10,9 +10,9 @@ from subprocess import DEVNULL, PIPE, CalledProcessError, check_output, run
from typing import List, Type
from core.instance_manager.instance_manager import InstanceManager
from core.instance_type import InstanceType
from core.logger import Logger
from utils.input_utils import get_confirm, get_number_input
from utils.instance_type import InstanceType
from utils.instance_utils import get_instances

View File

@@ -0,0 +1,25 @@
# ======================================================================= #
# Copyright (C) 2020 - 2024 Dominik Willner <th33xitus@gmail.com> #
# #
# This file is part of KIAUH - Klipper Installation And Update Helper #
# https://github.com/dw-0/kiauh #
# #
# This file may be distributed under the terms of the GNU GPLv3 license #
# ======================================================================= #
from typing import TypeVar
from components.klipper.klipper import Klipper
from components.moonraker.moonraker import Moonraker
from extensions.obico.moonraker_obico import MoonrakerObico
from extensions.octoeverywhere.octoeverywhere import Octoeverywhere
from extensions.telegram_bot.moonraker_telegram_bot import MoonrakerTelegramBot
InstanceType = TypeVar(
"InstanceType",
Klipper,
Moonraker,
MoonrakerTelegramBot,
MoonrakerObico,
Octoeverywhere,
)

View File

@@ -14,7 +14,7 @@ from typing import List
from core.constants import SYSTEMD
from core.instance_manager.base_instance import SUFFIX_BLACKLIST
from core.instance_type import InstanceType
from utils.instance_type import InstanceType
def get_instances(instance_type: type) -> List[InstanceType]: