def main(argv=None):
arguments = cli_common(__doc__, argv=argv)<EOL>plugin = '<STR_LIT>' if arguments['<STR_LIT>'] else None<EOL>if arguments['<STR_LIT>']:<EOL><INDENT>template.generate_config(plugin, arguments['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>with open(arguments['<STR_LIT>']) as istr:<EOL><INDENT>context = json.load(istr)<EOL><DEDENT>kwargs = dict(no_input=True, extra_context=context)<EOL>if arguments['<STR_LIT>']:<EOL><INDENT>kwargs.update(output_dir=arguments['<STR_LIT>'])<EOL><DEDENT>if arguments['<STR_LIT>']:<EOL><INDENT>kwargs.update(no_input=False)<EOL><DEDENT>logging.info(<EOL>'<STR_LIT>' + kwargs.get('<STR_LIT>', os.getcwd())<EOL>)<EOL>template.generate_template(plugin, **kwargs)<EOL><DEDENT>
ben-tpl entry point