<s> import argparse <EOL> from cafe . configurator . managers import ( <EOL> EngineDirectoryManager , EngineConfigManager , EnginePluginManager ) <EOL> class EngineActions ( object ) : <EOL> class Init ( object ) : <EOL> def __init__ ( self , args ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> EngineDirectoryManager . build_engine_directories ( ) <EOL> EngineConfigManager . build_engine_config ( ) <EOL> print ( "<STR_LIT>" ) <EOL> class InitInstall ( argparse . Action ) : <EOL> def __call__ ( <EOL> self , parser , namespace , values , <EOL> option_string = None ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> EngineDirectoryManager . build_engine_directories ( ) <EOL> EngineConfigManager . build_engine_config ( ) <EOL> print ( "<STR_LIT>" ) <EOL> class PluginActions ( object ) : <EOL> class InstallPlugin ( argparse . Action ) : <EOL> def __call__ ( <EOL> self , parser , namespace , values , <EOL> option_string = None ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> EnginePluginManager . install_plugins ( values ) <EOL> print ( "<STR_LIT>" ) <EOL> class ListPlugins ( argparse . Action ) : <EOL> def __call__ ( <EOL> self , parser , namespace , values , <EOL> option_string = None ) : <EOL> print ( "<STR_LIT>" ) <EOL> print ( "<STR_LIT>" ) <EOL> EnginePluginManager . list_plugins ( ) <EOL> print ( "<STR_LIT>" ) <EOL> class ConfiguratorCLI ( object ) : <EOL> """<STR_LIT>""" <EOL> @ classmethod <EOL> def run ( cls ) : <EOL> parser = argparse . ArgumentParser ( ) <EOL> subparsers = parser . add_subparsers ( dest = "<STR_LIT>" ) <EOL> subparser_engine_config = subparsers . add_parser ( <EOL> '<STR_LIT>' ) <EOL> subparser_engine_config . add_argument ( <EOL> '<STR_LIT>' , <EOL> action = EngineActions . InitInstall , <EOL> nargs = <NUM_LIT:0> , <EOL> help = "<STR_LIT>" ) <EOL> subparser_init = subparsers . add_parser ( '<STR_LIT>' ) <EOL> subparser_init . set_defaults ( func = EngineActions . Init ) <EOL> subparser_plugins = subparsers . add_parser ( '<STR_LIT>' ) <EOL> plugin_args = subparser_plugins . add_subparsers ( <EOL> dest = '<STR_LIT>' ) <EOL> plugins_list_parser = plugin_args . add_parser ( '<STR_LIT:list>' ) <EOL> plugins_list_parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> action = PluginActions . ListPlugins , <EOL> nargs = <NUM_LIT:0> ) <EOL> plugins_install_parser = plugin_args . add_parser ( '<STR_LIT>' ) <EOL> plugins_install_parser . add_argument ( <EOL> '<STR_LIT>' , <EOL> action = PluginActions . InstallPlugin , <EOL> type = str , <EOL> nargs = '<STR_LIT:*>' ) <EOL> args = parser . parse_args ( ) <EOL> try : <EOL> args . func ( args ) <EOL> except AttributeError : <EOL> return args <EOL> def entry_point ( ) : <EOL> cli = ConfiguratorCLI ( ) <EOL> cli . run ( ) </s>
