49 lines
795 B
Python
49 lines
795 B
Python
import os
|
|
from abc import ABC, abstractmethod
|
|
from typing import Tuple, List
|
|
|
|
from logger import Logger
|
|
|
|
|
|
class Action(ABC):
|
|
def __init__(self, *args, **kwargs):
|
|
self.args = args
|
|
self.kwargs = kwargs
|
|
|
|
@abstractmethod
|
|
def execute(self, *args, **kwargs):
|
|
pass
|
|
|
|
|
|
class LoggMessageAction(Action):
|
|
|
|
def execute(self, *args, **kwargs):
|
|
entry = self.kwargs.get('entry')
|
|
Logger.write_message(entry, self.args[0])
|
|
|
|
|
|
class StubAction(Action):
|
|
def execute(self, *args, **kwargs):
|
|
pass
|
|
|
|
|
|
class ReadAction(Action):
|
|
|
|
def execute(self, *args, **kwargs):
|
|
pass
|
|
|
|
|
|
class MoveAction(Action):
|
|
|
|
def execute(self, *args, **kwargs):
|
|
pass
|
|
|
|
|
|
class CompressAction(Action):
|
|
|
|
def execute(self, *args, **kwargs):
|
|
pass
|
|
|
|
|
|
|