@plugins.command('new')
@click.argument('plugin_identifier', callback=check_cookiecutter)
@click.option('--template', '-t', type=click.STRING, default='https://github.com/sh4nks/cookiecutter-flaskbb-plugin', help='Path to a cookiecutter template or to a valid git repo.')
def new_plugin(plugin_identifier, template):
 out_dir = os.path.join(current_app.root_path, 'plugins', plugin_identifier)
 click.secho('[+] Creating new plugin {}'.format(plugin_identifier), fg='cyan')
 cookiecutter(template, output_dir=out_dir)
 click.secho('[+] Done. Created in {}'.format(out_dir), fg='green', bold=True)

@ plugins . command ( 'new' ) @ click . argument ( 'plugin_identifier' , callback = check_cookiecutter ) @ click . option ( '--template' , '-t' , type = click . STRING , default = 'https://github.com/sh4nks/cookiecutter-flaskbb-plugin' , help = 'Path to a cookiecutter template or to a valid git repo.' ) def new_plugin ( plugin_identifier , template ) : out_dir = os . path . join ( current_app . root_path , 'plugins' , plugin_identifier ) click . secho ( '[+] Creating new plugin {}' . format ( plugin_identifier ) , fg = 'cyan' ) cookiecutter ( template , output_dir = out_dir ) click . secho ( '[+] Done. Created in {}' . format ( out_dir ) , fg = 'green' , bold = True )
creates a new plugin based on the cookiecutter plugin template .