ckan/lib/cli.py
def paster_click_group(summary):
    '''Return a paster command click.Group for paster subcommands

    :param command: the paster command linked to this function from
        setup.py, used in help text (e.g. "datastore")
    :param summary: summary text used in paster's help/command listings
        (e.g. "Perform commands to set up the datastore")
    '''
    class PasterClickGroup(click.Group):
        '''A click.Group that may be called like a paster command'''
        def __call__(self, ignored_command):
            sys.argv.remove(ignored_command)
            return super(PasterClickGroup, self).__call__(
                prog_name=u'paster ' + ignored_command,
                help_option_names=[u'-h', u'--help'],
                obj={})

    @click.group(cls=PasterClickGroup)
    @click.option(
        '--plugin',
        metavar='ckan',
        help='paster plugin (when run outside ckan directory)')
    @click_config_option
    @click.pass_context
    def cli(ctx, plugin, config):
        ctx.obj['config'] = config


    cli.summary = summary
    cli.group_name = u'ckan'
    return cli
Return a paster command click.Group for paster subcommands

    :param command: the paster command linked to this function from
        setup.py, used in help text (e.g. "datastore")
    :param summary: summary text used in paster's help/command listings
        (e.g. "Perform commands to set up the datastore")
    
Return a paster command click.Group for paster subcommands
Return a paster command click . Group for paster subcommands
def paster_click_group(summary):
    class PasterClickGroup(click.Group):
        def __call__(self, ignored_command):
            sys.argv.remove(ignored_command)
            return super(PasterClickGroup, self).__call__(
                prog_name=u'paster ' + ignored_command,
                help_option_names=[u'-h', u'--help'],
                obj={})
    @click.group(cls=PasterClickGroup)
    @click.option(
        '--plugin',
        metavar='ckan',
        help='paster plugin (when run outside ckan directory)')
    @click_config_option
    @click.pass_context
    def cli(ctx, plugin, config):
        ctx.obj['config'] = config
    cli.summary = summary
    cli.group_name = u'ckan'
    return cli
def paster_click_group ( summary ) : class PasterClickGroup ( click . Group ) : '''A click.Group that may be called like a paster command''' def __call__ ( self , ignored_command ) : sys . argv . remove ( ignored_command ) return super ( PasterClickGroup , self ) . __call__ ( prog_name = u'paster ' + ignored_command , help_option_names = [ u'-h' , u'--help' ] , obj = { } ) @ click . group ( cls = PasterClickGroup ) @ click . option ( '--plugin' , metavar = 'ckan' , help = 'paster plugin (when run outside ckan directory)' ) @ click_config_option @ click . pass_context def cli ( ctx , plugin , config ) : ctx . obj [ 'config' ] = config cli . summary = summary cli . group_name = u'ckan' return cli
Return a paster command click.Group for paster subcommands
Return a paster command click . Group for paster subcommands
'''Return a paster command click.Group for paster subcommands

    :param command: the paster command linked to this function from
        setup.py, used in help text (e.g. "datastore")
    :param summary: summary text used in paster's help/command listings
        (e.g. "Perform commands to set up the datastore")
    ''' '''A click.Group that may be called like a paster command'''
summary
summary text used in paster's help/command listings
summary text used in paster ' s help / command listings
command
the paster command linked to this function from
setup.py, used in help text
the paster command linked to this function from setup . py used in help text