Esempio n. 1
0
 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])
Esempio n. 2
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])
Esempio n. 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])
Esempio n. 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,
     ], )
Esempio n. 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,
     ], )