mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
from pprint import pprint
|
|
from rich.console import Console
|
|
|
|
from argenta.command import Command
|
|
from argenta.command.flag import Flags, InputFlags
|
|
from argenta.command.flag.defaults import PredeterminedFlags
|
|
from argenta.router import Router
|
|
from .handlers_implementation.help_command import help_command
|
|
|
|
|
|
work_router: Router = Router(title='Work points:')
|
|
work_router.set_invalid_input_flag_handler(lambda flag: print(f'Invalid input flag: {flag.get_string_entity()} {flag.get_value() if flag.get_value() else ''}'))
|
|
|
|
settings_router: Router = Router(title='Settings points:')
|
|
|
|
|
|
console = Console()
|
|
|
|
|
|
@work_router.command(Command(trigger='0', description='Get Help'))
|
|
def command_help():
|
|
help_command()
|
|
|
|
|
|
@work_router.command(Command(trigger='S', description='Start Solving', flags=Flags(PredeterminedFlags.HOST, PredeterminedFlags.PORT)))
|
|
def command_start_solving(args: InputFlags):
|
|
print('Solving...')
|
|
pprint(args.get_flag('host'))
|
|
#start_solving_command()
|
|
|
|
|
|
@settings_router.command(Command(trigger='U', description='Update WordMath'))
|
|
def command_update():
|
|
print('Command update')
|
|
|
|
|
|
|
|
|