2019-01-06 21:29:21 +01:00
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
AVAILABLE_TOOLS = {}
|
|
|
|
|
|
|
|
def register_tool(name):
|
2021-05-24 23:02:54 +02:00
|
|
|
"""
|
|
|
|
TODO
|
|
|
|
"""
|
2019-01-06 21:29:21 +01:00
|
|
|
def decorator(Cls):
|
|
|
|
AVAILABLE_TOOLS.update({name: Cls})
|
|
|
|
return decorator
|
|
|
|
|
|
|
|
|
|
|
|
class Tool:
|
|
|
|
def __init__(self, options):
|
|
|
|
pass
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def instance(cls, name, options):
|
|
|
|
if name in AVAILABLE_TOOLS:
|
|
|
|
return AVAILABLE_TOOLS.get(name)(options)
|
|
|
|
return None
|