mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
refactor and optimize argspace
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
from argenta import App, Orchestrator
|
||||
from argenta.orchestrator.argparser import ArgParser, BooleanArgument
|
||||
from argenta.orchestrator.argparser import ArgParser, BooleanArgument, ValueArgument
|
||||
|
||||
arg_parser = ArgParser(processed_args=[BooleanArgument("config")])
|
||||
arg_parser = ArgParser(processed_args=[BooleanArgument("dev"), ValueArgument('some', possible_values=['fuck', 'cruck'])])
|
||||
orchestrator = Orchestrator(
|
||||
arg_parser=arg_parser,
|
||||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
orchestrator.start_polling(App())
|
||||
if arg_parser.parsed_argspace.get_by_name('dev'):
|
||||
orchestrator.start_polling(App(initial_message='ArgentaDev'))
|
||||
else:
|
||||
orchestrator.start_polling(App())
|
||||
|
||||
Reference in New Issue
Block a user