mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-23 07:43:36 +05:00
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:
@@ -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]
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
25
kiauh/utils/instance_type.py
Normal file
25
kiauh/utils/instance_type.py
Normal 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,
|
||||
)
|
||||
@@ -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]:
|
||||
|
||||
Reference in New Issue
Block a user