Gets the "short" documentation of a command.

        By default, this is the :attr:`brief` attribute.
        If that lookup leads to an empty string then the first line of the
        :attr:`help` attribute is used instead.
324663
def short_doc(self):
        
        if self.brief is not None:
            return self.brief
        if self.help is not None:
            return self.help.split('\n', 1)[0]
        return ''
43492
def getHelpAsString(docstring=False, show_ver=True):
    
    install_dir = os.path.dirname(__file__)
    taskname = util.base_taskname(__taskname__, __package__)
    htmlfile = os.path.join(install_dir, 'htmlhelp', taskname + '.html')
    helpfile = os.path.join(install_dir, taskname + '.help')

    if docstring or (not docstring and not os.path.exists(htmlfile)):
        if show_ver:
            helpString = "\n{:s} Version {:s} updated on {:s}\n\n".format(
                __taskname__, __version__, __version_date__
            )
        else:
            helpString = ''

        if os.path.exists(helpfile):
            helpString += teal.getHelpFileAsString(taskname, __file__)
        elif __doc__ is not None:
                helpString += __doc__ + os.linesep

    else:
        helpString = 'file://' + htmlfile

    return helpString
535024
def load_help_files(data):
    
    for command_name, help_yaml in helps.items():

        help_entry = yaml.safe_load(help_yaml)
        try:
            help_type = help_entry['type']
        except KeyError:
            continue

        # if there is extra help for this command but it's not reflected in the command table
        if command_name not in data and help_type == 'command':
            logger.debug('Command: %s not found in command table', command_name)
            continue

        short_summary = help_entry.get('short-summary')
        if short_summary and help_type == 'command':
            data[command_name]['help'] = short_summary
        else:
            # must be a command group or sub-group
            data[command_name] = {'help': short_summary}
            continue

        if 'parameters' in help_entry:
            for param in help_entry['parameters']:
                # this could fail if the help file and options list are not in the same order
                param_name = param['name'].split()[0]

                if param_name not in data[command_name]['parameters']:
                    logger.debug('Command %s does not have parameter: %s', command_name, param_name)
                    continue

                if 'short-summary' in param:
                    data[command_name]['parameters'][param_name]['help'] = param["short-summary"]

        if 'examples' in help_entry:
            data[command_name]['examples'] = [[example['name'], example['text']]
                                              for example in help_entry['examples']]
89921
def short_str(self):
        
        if self.version is None and self.url is None:
            return ''
        return '%s <%s>' % (self.version, self.url)
673572
def get_help(obj, env, subcmds):
    
    doc = txt.dedent(obj.__doc__ or "")
    env = env.copy()  ## get a local copy

    doc = doc.strip()
    if not re.search(r"^usage:\s*$", doc, flags=re.IGNORECASE | re.MULTILINE):
        doc += txt.dedent("""

            Usage:
              %(std_usage)s

            Options:
              %(std_options)s""")

    help_line = ("  %%-%ds  %%s"
                 % (max([5] + [len(a) for a in subcmds]), ))
    env["actions"] = "\n".join(
        help_line % (
            name,
            get_help(subcmd, subcmd_env(env, name), {}).split("\n")[0])
        for name, subcmd in subcmds.items())
    env["actions_help"] = "" if not env["actions"] else (
        "ACTION could be one of:\n\n"
        "%(actions)s\n\n"
        "See '%(surcmd)s help ACTION' for more information "
        "on a specific command."
        % env)
    if "%(std_usage)s" in doc:
        env["std_usage"] = txt.indent(
            ("%(surcmd)s --help\n"
             "%(surcmd)s --version" +
             (("\n%(surcmd)s help [COMMAND]"
               "\n%(surcmd)s ACTION [ARGS...]") if subcmds else ""))
            % env,
            _find_prefix(doc, "%(std_usage)s"),
            first="")
    if "%(std_options)s" in doc:
        env["std_options"] = txt.indent(
            "--help          Show this screen.\n"
            "--version       Show version.",
            _find_prefix(doc, "%(std_options)s"),
            first="")

    if subcmds and "%(actions_help)s" not in doc:
        doc += "\n\n%(actions_help)s"
    try:
        output = doc % env
    except KeyError as e:
        msg.err("Doc interpolation of %s needed missing key %r"
                % (aformat(env["surcmd"], attrs=["bold", ]),
                   e.args[0]))
        exit(1)
    except Exception as e:
        msg.err(
            "Documentation of %s is not valid. Please check it:\n%s"
            % (aformat(env["surcmd"], attrs=["bold", ]),
               doc))
        exit(1)
    return output
127023
def help(self):
        ''''''
        cmds = self.get_exposed_cmds()
        t = text_helper.Table(fields=['command', 'doc'],
                              lengths=[50, 85])
        return t.render((reflect.formatted_function_name(x), x.__doc__, )
                        for x in cmds.values())
1188439
def help(command): # this comes first to make it easy to spot
		'''  '''
		for i, v in ByPy.__dict__.items():
			if callable(v) and v.__doc__ and v.__name__ == command :
				help = v.__doc__.strip()
				pos = help.find(const.HelpMarker)
				if pos != -1:
					pr("Usage: " + help[pos + len(const.HelpMarker):].strip())
1220399
def from_format(self, attr):
        
        if attr.name_format:
            if self.name_format == attr.name_format:
                try:
                    return self._fro[attr.name.lower()]
                except KeyError:
                    pass
        else:  # don't know the name format so try all I have
            try:
                return self._fro[attr.name.lower()]
            except KeyError:
                pass

        return ""
398783
def help_text(cls):
        """"""
        docs = [cmd_func.__doc__ for cmd_func in cls.commands.values()]

        # Don't want to include 'usage: ' or explanation.
        usage_lines = [doc.partition('\n')[0] for doc in docs]
        terse_lines = [line[len('Usage: '):] for line in usage_lines]
        terse_lines.sort()
        return '\n'.join(['Available commands:\n'] + terse_lines)
565635
def do_help(self, arg):
        
        if not arg:
            return cmd.Cmd.do_help(self, arg)
        try:
            try:
                topic = getattr(self, 'help_' + arg)
                return topic()
            except AttributeError:
                command = getattr(self, 'do_' + arg)
        except AttributeError:
            self.error('No help for %r' % arg)
        else:
            if sys.flags.optimize >= 2:
                self.error('No help for %r; please do not run Python with -OO '
                           'if you need command help' % arg)
                return
            self.message(command.__doc__.rstrip())
449273
public function getShortDescription(): string
    {
        $commandMethodReflection = $this->getCommandMethodReflection();
        $lines = explode(chr(10), $commandMethodReflection->getDescription());
        $shortDescription = ((count($lines) > 0) ? trim($lines[0]) : '<no description available>') . ($this->isDeprecated() ? ' <b>(DEPRECATED)</b>' : '');

        if ($commandMethodReflection->getDeclaringClass()->implementsInterface(DescriptionAwareCommandControllerInterface::class)) {
            $shortDescription = call_user_func([$this->controllerClassName, 'processDescription'], $this->controllerCommandName, $shortDescription, $this->objectManager);
        }
        return $shortDescription;
    }
596365
def _get_requirement_attr(self, attr, path):
        
        for req_file in self.requirements:
            if path.strip("/") == req_file.path.strip("/"):
                return getattr(req_file, attr)
        return getattr(self, attr)
855926
function getHelp() {
  if (HelpText) return HelpText

  var helpFile = path.join(__dirname, utils.COMMAND + ".help.txt" )
  var content  = fs.readFileSync(helpFile, "utf8")

  content = content.replace(/%COMMAND%/g,     utils.COMMAND    )
  content = content.replace(/%PACKAGE%/g,     utils.PACKAGE    )
  content = content.replace(/%VERSION%/g,     utils.VERSION    )
  content = content.replace(/%DESCRIPTION%/g, utils.DESCRIPTION)
  content = content.replace(/%HOMEPAGE%/g,    utils.HOMEPAGE   )

  HelpText = content
  return HelpText
}
663630
def short_description(self):
        
        if self.is_insertion:
            return "chr%s g.%d_%dins%s" % (
                self.contig,
                self.start,
                self.start + 1,
                self.alt)
        elif self.is_deletion:
            return "chr%s g.%d_%ddel%s" % (
                self.contig,
                self.start,
                self.end,
                self.ref)
        elif self.ref == self.alt:
            return "chr%s g.%d%s" % (self.contig, self.start, self.ref)
        else:
            # substitution
            return "chr%s g.%d%s>%s" % (
                self.contig,
                self.start,
                self.ref,
                self.alt)
791739
function _shortTitleForDocument(doc) {
        var fullPath = doc.file.fullPath;

        // If the document is untitled then return the filename, ("Untitled-n.ext");
        // otherwise show the project-relative path if the file is inside the
        // current project or the full absolute path if it's not in the project.
        if (doc.isUntitled()) {
            return fullPath.substring(fullPath.lastIndexOf("/") + 1);
        } else {
            return ProjectManager.makeProjectRelativeIfPossible(fullPath);
        }
    }
1046742
def documentation(self, add_to=None, version=None, prefix="", base_url="", url=""):
        """"""
        doc = OrderedDict() if add_to is None else add_to

        usage = self.interface.spec.__doc__
        if usage:
            doc['usage'] = usage

        for example in self.examples:
            example_text = "{0}{1}{2}{3}".format(prefix, base_url, '/v{0}'.format(version) if version else '', url)
            if isinstance(example, str):
                example_text += "?{0}".format(example)
            doc_examples = doc.setdefault('examples', [])
            if not example_text in doc_examples:
                doc_examples.append(example_text)

        doc = super().documentation(doc)

        if getattr(self, 'output_doc', ''):
            doc['outputs']['type'] = self.output_doc

        return doc
1096042
def method_missing(name, *args)
      name = name.to_s
      last_char = name[-1,1]
      super(name, *args) unless last_char == "=" || last_char == "?"
      attr_name = name[0..-2].to_sym # :foo for 'foo=' or 'foo?'
      if last_char == "="
        @options[attr_name] = args.at(0)
      else
        @options[attr_name]
      end
    end