Prints a list of plugins and details

 options - a Hash of options from the `list` command

   Note: if options are empty, this will display a
   list of plugin names, slugs, versions, and descriptions,
   but no assets, i.e. 'minimal' info.
548776
def list(options={})
      site = Octopress.site(options)
      Plugins.register
      options = {'minimal'=>true} if options.empty?
      message = "Octopress Ink - v#{VERSION}\n"

      if plugins.size > 0
        plugins.each do |plugin|
          message += plugin.list(options)
        end
      else
        message += "You have no plugins installed."
      end
      puts message
    end
165603
def option_descriptions(operation):
    
    lines = inspect.getdoc(operation)

    if not lines:
        return {}

    param_breaks = ["'''", '"""', ':param', ':type', ':return', ':rtype']
    option_descs = {}

    lines = lines.splitlines()
    index = 0
    while index < len(lines):
        l = lines[index]
        regex = r'\s*(:param)\s+(.+?)\s*:(.*)'
        match = re.search(regex, l)
        if not match:
            index += 1
            continue

        # 'arg name' portion might have type info, we don't need it
        arg_name = str.split(match.group(2))[-1]
        arg_desc = match.group(3).strip()
        # look for more descriptions on subsequent lines
        index += 1
        while index < len(lines):
            temp = lines[index].strip()
            if any(temp.startswith(x) for x in param_breaks):
                break
            else:
                if temp:
                    arg_desc += (' ' + temp)
                index += 1

        option_descs[arg_name] = arg_desc

    return option_descs
564727
def _add_plugin_options(self, available_plugins: Set[Type[Plugin]]) -> None:
        
        for plugin_class in available_plugins:
            # Add the current plugin's commands to the parser
            group = OptionGroup(self._parser, plugin_class.get_title(), plugin_class.get_description())
            for option in plugin_class.get_cli_option_group():
                group.add_option(option)
            self._parser.add_option_group(group)
780379
def main(show_details:['-l']=False, cols:['-w', '--width']='', *files):
    '''
    
    '''
    print(files)
    print(show_details)
    print(cols)
1299286
private function printOptionsAndExit() {
		echo "Available Options:\n";
		foreach ($this->validShortOptions as $option => $info) {
			echo "-\033[1m{$option}\033[0m\n	{$info['comment']}\n	{$info['description']}\n		Example: {$info['example']}\n\n";
		}
		foreach ($this->validLongOptions as $option => $info) {
			echo "--\033[1m{$option}\033[0m\n	{$info['comment']}\n	{$info['description']}\n		Example: {$info['example']}\n\n";
		}
		exit;
	}
503440
def print_bump_plan(bump_info)
      level = bump_level
      print_bump_plan_level level, bump_info unless level.nil?

      preid = @options[:preid]
      print_bump_plan_preid preid, bump_info unless preid.nil?

      print_bump_plan_release bump_info if @options[:release]

      log
    end
584151
def describe(self):
        """"""
        if isinstance(self._plugin, list):
            pl = [p.name for p in self._plugin]
        elif isinstance(self._plugin, dict):
            pl = {k: classname(v) for k, v in self._plugin.items()}
        else:
            pl = self._plugin if isinstance(self._plugin, str) else self._plugin.name
        return {
            'name': self._name,
            'container': self._container,
            'plugin': pl,
            'description': self._description,
            'direct_access': self._direct_access,
            'user_parameters': [u.describe() for u in self._user_parameters],
            'metadata': self._metadata,
            'args': self._open_args
        }
1079679
def _do_info(bz, opt):
    
    # All these commands call getproducts internally, so do it up front
    # with minimal include_fields for speed
    def _filter_components(compdetails):
        ret = {}
        for k, v in compdetails.items():
            if v.get("is_active", True):
                ret[k] = v
        return ret

    productname = (opt.components or opt.component_owners or opt.versions)
    include_fields = ["name", "id"]
    fastcomponents = (opt.components and not opt.active_components)
    if opt.versions:
        include_fields += ["versions"]
    if opt.component_owners:
        include_fields += [
            "components.default_assigned_to",
            "components.name",
        ]
    if (opt.active_components and
        any(["components" in i for i in include_fields])):
        include_fields += ["components.is_active"]

    bz.refresh_products(names=productname and [productname] or None,
            include_fields=include_fields)

    if opt.products:
        for name in sorted([p["name"] for p in bz.getproducts()]):
            print(name)

    elif fastcomponents:
        for name in sorted(bz.getcomponents(productname)):
            print(name)

    elif opt.components:
        details = bz.getcomponentsdetails(productname)
        for name in sorted(_filter_components(details)):
            print(name)

    elif opt.versions:
        proddict = bz.getproducts()[0]
        for v in proddict['versions']:
            print(to_encoding(v["name"]))

    elif opt.component_owners:
        details = bz.getcomponentsdetails(productname)
        for c in sorted(_filter_components(details)):
            print(to_encoding(u"%s: %s" % (c,
                details[c]['default_assigned_to'])))
486411
public function printSummary() {
    drush_print();

    // Print env files used for this definition.
    drush_print($this->formatHeading('Environment Definitions Found'));
    foreach ($this->loadedEnvs as $filename) {
      drush_print("{$filename}", 1);
    }

    drush_print();
    drush_print($this->formatHeading(dt("CONFIGURATION SUMMARY")));

    // We want to make sure they are printed in the same order as they will run.
    foreach ($this->getActiveDefinition() as $group => $options) {
      // Print a nice heading.
      $heading = $this->formatHeading($group);

      switch (strtolower($group)) {
        case 'modules':
          $this->printModuleSummary($options, $heading);
          break;

        case 'variables':
          $this->printVariableSummary($options, $heading);
          break;

        case 'permissions':
          $this->printPermissionSummary($options, $heading);
          break;

        case 'commands':
          $this->printCommandSummary($options, $heading);
          break;

        default:
          drush_print($this->formatHeading($group));
          drush_log(dt("I'm not sure what to do with '@group'.", ['@group' => $group]), 'warning');
          break;
      }
    }
  }
1182995
def list_plugins():
    '''
    
    '''
    plugin_list = os.listdir(PLUGINDIR)
    ret = []
    for plugin in plugin_list:
        # Check if execute bit
        stat_f = os.path.join(PLUGINDIR, plugin)
        execute_bit = stat.S_IXUSR & os.stat(stat_f)[stat.ST_MODE]
        if execute_bit:
            ret.append(plugin)
    return ret
152899
def print_all_commands(self, *, no_pager=False):
        
        formatter = self.parent_parser._get_formatter()
        command_names = sorted(self.parent_parser.subparsers.choices.keys())
        max_name_len = max([len(name) for name in command_names]) + 1
        commands = ""
        for name in command_names:
            command = self.parent_parser.subparsers.choices[name]
            extra_padding = max_name_len - len(name)
            command_line = '%s%s%s' % (
                name, ' ' * extra_padding, command.description)
            while len(command_line) > formatter._width:
                lines = textwrap.wrap(command_line, formatter._width)
                commands += "%s\n" % lines[0]
                if len(lines) > 1:
                    lines[1] = (' ' * max_name_len) + lines[1]
                    command_line = ' '.join(lines[1:])
                else:
                    command_line = None
            if command_line:
                commands += "%s\n" % command_line
        if no_pager:
            print(commands[:-1])
        else:
            print_with_pager(commands[:-1])
443058
def ListCommands(self):
    """"""
    print 'Available commands:'
    commands = dict(self.commands)
    for plugin in self.plugins:
      commands.update(plugin.commands)
    for com in sorted(commands):
      if not com.startswith('_'):
        self.PrintHelpTextLine(com, commands[com])
982598
def render_item
      partial_opts = {
        title: title,
        subtitle: subtitle,
        description: description,
        url: url,
        image: image(@opts[:image_version]),
        type: list_item.type,
        object: object_available? ? list_item.object.decorate : nil
      }

      controller.render partial: @opts[:partial_path], locals: partial_opts, layout: false
    end
474635
def describe(shallow = true, example: nil)
      description = {}
      # Clone the common options
      TOP_LEVEL_OPTIONS.each do |option_name|
        description[option_name] = options[option_name] if options.key? option_name
      end

      # Make sure this option definition is not mistaken for the real generated example
      if (ex_def = description.delete(:example))
        description[:example_definition] = ex_def
      end

      special_options = options.keys - TOP_LEVEL_OPTIONS - INTERNAL_OPTIONS
      description[:options] = {} unless special_options.empty?
      special_options.each do |opt_name|
        description[:options][opt_name] = options[opt_name]
      end
      # Change the reference option to the actual class name.
      if (reference = options[:reference])
        description[:options][:reference] = reference.name
      end

      description[:type] = type.describe(shallow, example: example)
      # Move over any example from the type, into the attribute itself
      if (ex = description[:type].delete(:example))
        description[:example] = dump(ex)
      end

      description
    end
526563
def print_plugin_information(references)
      rows = references.collect do |current|
        if current[1][:actions].empty?
          # Something is wrong with this plugin, no available actions
          [current[0].red, current[1][:version_number], "No actions found".red]
        else
          [current[0], current[1][:version_number], current[1][:actions].join("\n")]
        end
      end

      require 'terminal-table'
      puts(Terminal::Table.new({
        rows: FastlaneCore::PrintTable.transform_output(rows),
        title: "Used plugins".green,
        headings: ["Plugin", "Version", "Action"]
      }))
      puts("")
    end
594984
def parse_options
      super do |opts|

        opts.on("-u", "--unmodified [MODE]", "Show unmodified repos.  MODE=SHOW (default), DOTS, or HIDE") do |u|
          options[:unmodified] = u || "SHOW"
          options[:unmodified].upcase!
        end

        opts.on("--short", "Summary status only, do not show individual file status") do |s|
          options[:short] = s
        end

      end
    end
443677
def print_help_info(self, global_options):
        
        usage = ['',"Type '%s help <subcommand>' for help on a specific subcommand." % self.prog_name,'']
        usage.append('Available subcommands:')
        commands = list(self.get_commands().keys())
        commands.sort()
        for cmd in commands:
            usage.append('  %s' % cmd)
        return '\n'.join(usage)