예제 #1
0
파일: cli.py 프로젝트: balavec/plonecli
 def add(context, template):
     """Add features to your existing Plone package"""
     if context.obj.get('target_dir', None) is None:
         raise NotInPackageError(context.command.name)
     bobtemplate = reg.resolve_template_name(template)
     if bobtemplate is None:
         raise NoSuchValue(context.command.name,
                           template,
                           possibilities=reg.get_templates())
     echo('\nRUN: mrbob {0}'.format(bobtemplate), fg='green', reverse=True)
     subprocess.call(['mrbob', bobtemplate])
예제 #2
0
파일: cli.py 프로젝트: balavec/plonecli
 def create(context, template, name):
     """Create a new Plone package"""
     bobtemplate = reg.resolve_template_name(template)
     if bobtemplate is None:
         raise NoSuchValue(context.command.name,
                           template,
                           possibilities=reg.get_templates())
     cur_dir = os.getcwd()
     context.obj['target_dir'] = '{0}/{1}'.format(cur_dir, name)
     echo(
         '\nRUN: mrbob {0} -O {1}'.format(bobtemplate, name),
         fg='green',
         reverse=True,
     )
     subprocess.call(['mrbob', bobtemplate, '-O', name])
예제 #3
0
def create(context, template, name):
    """Create a new Plone package"""
    bobtemplate = reg.resolve_template_name(template)
    if bobtemplate is None:
        raise NoSuchValue(context.command.name,
                          template,
                          possibilities=reg.get_templates())
    cur_dir = os.getcwd()
    context.obj["target_dir"] = "{0}/{1}".format(cur_dir, name)
    echo(
        "\nRUN: mrbob {0} -O {1}".format(bobtemplate, name),
        fg="green",
        reverse=True,
    )
    subprocess.call(["mrbob", bobtemplate, "-O", name])
예제 #4
0
 def add(context, template, verbose):
     """Add features to your existing Plone package"""
     if context.obj.get('target_dir', None) is None:
         raise NotInPackageError(context.command.name)
     bobtemplate = reg.resolve_template_name(template)
     if bobtemplate is None:
         raise NoSuchValue(
             context.command.name,
             template,
             possibilities=reg.get_templates(),
         )
     if verbose:
         click.echo('RUN: mrbob {0}'.format(bobtemplate))
     subprocess.call([
         'mrbob',
         bobtemplate,
     ], )
예제 #5
0
 def create(context, template, name, verbose):
     """Create a new Plone package"""
     bobtemplate = reg.resolve_template_name(template)
     if bobtemplate is None:
         raise NoSuchValue(
             context.command.name,
             template,
             possibilities=reg.get_templates(),
         )
     cur_dir = os.getcwd()
     context.obj['target_dir'] = '{0}/{1}'.format(cur_dir, name)
     if verbose:
         click.echo('RUN: mrbob {0} -O {1}'.format(bobtemplate, name))
     subprocess.call([
         'mrbob',
         bobtemplate,
         '-O',
         name,
     ], )