@cli_app.command("create-addon")
@click.option('--name', prompt="Your new addon name", help="Your addon name will be prefixed by fab_addon_, directory will have this name")
def create_addon(name):
    try:
        full_name = 'fab_addon_' + name
        dirname = "Flask-AppBuilder-Skeleton-AddOn-master"
        url = urlopen(ADDON_REPO_URL)
        zipfile = ZipFile(BytesIO(url.read()))
        zipfile.extractall()
        os.rename(dirname, full_name)
        addon_path =  os.path.join(full_name,full_name)
        os.rename(os.path.join(full_name, 'fab_addon'), addon_path)
        f = open(os.path.join(full_name, 'config.py'), 'w')
        f.write("ADDON_NAME='" + name + "'\n")
        f.write("FULL_ADDON_NAME='fab_addon_' + ADDON_NAME\n")
        f.close()
        click.echo(click.style('Downloaded the skeleton addon, good coding!', fg='green'))
        return True
    except Exception as e:
        click.echo(click.style('Something went wrong {0}'.format(e), fg='red'))
        return False
Main routine when running from command-line.
dataset/ETHPy150Open dpgaspar/Flask-AppBuilder/flask_appbuilder/console.py/create_addon--crossover with--dataset/ETHPy150Open coreemu/core/daemon/ns3/examples/ns3lte.py/main