Skip to content

tags ¤

Section module.

This module contains the Section class.

Classes:

  • AuthorTag

    A tag representing an author.

  • BriefTag

    A tag representing a summary.

  • BugTag

    A tag representing a bug note.

  • CaveatTag

    A tag representing caveats.

  • CopyrightTag

    A tag representing copyright information.

  • DateTag

    A tag representing a date.

  • DescTag

    A tag representing a description.

  • EnvTag

    A tag representing an environment variable used by the script.

  • ErrorTag

    A tag representing a known error.

  • ExampleTag

    A tag representing a code/shell example.

  • ExitTag

    A tag representing an exit code.

  • FileTag

    A tag representing a file used by a script.

  • FunctionTag

    A tag representing a shell function.

  • HistoryTag

    A tag representing a script's history.

  • LicenseTag

    A tag representing a license.

  • NameDescTag

    A tag holding a name and a description.

  • NoteTag

    A tag representing a note.

  • OptionTag

    A tag representing a command-line option.

  • SeealsoTag

    A tag representing "See Also" information.

  • StderrTag

    A tag representing the standard error of a script/function.

  • StdinTag

    A tag representing the standard input of a script/function.

  • StdoutTag

    A tag representing the standard output of a script/function.

  • Tag

    Base class for tags.

  • TextTag

    A simple tag holding text only.

  • UsageTag

    A tag representing the command-line usage of a script.

  • VersionTag

    A tag representing a version.

AuthorTag dataclass ¤

Bases: TextTag

A tag representing an author.

Attributes:

BriefTag dataclass ¤

Bases: TextTag

A tag representing a summary.

Attributes:

BugTag dataclass ¤

Bases: TextTag

A tag representing a bug note.

Attributes:

CaveatTag dataclass ¤

Bases: TextTag

A tag representing caveats.

Attributes:

CopyrightTag dataclass ¤

Bases: TextTag

A tag representing copyright information.

Attributes:

DateTag dataclass ¤

Bases: TextTag

A tag representing a date.

Attributes:

DescTag dataclass ¤

Bases: TextTag

A tag representing a description.

Attributes:

EnvTag dataclass ¤

Bases: NameDescTag

A tag representing an environment variable used by the script.

Attributes:

ErrorTag dataclass ¤

Bases: TextTag

A tag representing a known error.

Attributes:

ExampleTag dataclass ¤

Bases: Tag

A tag representing a code/shell example.

Attributes:

brief instance-attribute ¤

brief: str

The example's summary.

code instance-attribute ¤

code: str

The example's code.

code_lang instance-attribute ¤

code_lang: str

The example's language.

description instance-attribute ¤

description: str

The example's description.

ExitTag dataclass ¤

Bases: Tag

A tag representing an exit code.

Attributes:

code instance-attribute ¤

code: str

The exit code.

description instance-attribute ¤

description: str

The code description.

FileTag dataclass ¤

Bases: NameDescTag

A tag representing a file used by a script.

Attributes:

FunctionTag dataclass ¤

Bases: Tag

A tag representing a shell function.

Attributes:

arguments instance-attribute ¤

arguments: Sequence[str]

The function's arguments.

brief instance-attribute ¤

brief: str

The function's summary.

description instance-attribute ¤

description: str

The function's description.

preconditions instance-attribute ¤

preconditions: Sequence[str]

The function's preconditions.

prototype instance-attribute ¤

prototype: str

The function's prototype.

return_codes instance-attribute ¤

return_codes: Sequence[str]

The function's return codes.

seealso instance-attribute ¤

seealso: Sequence[str]

The function's "see also" information.

stderr instance-attribute ¤

stderr: Sequence[str]

The function's standard error.

stdin instance-attribute ¤

stdin: Sequence[str]

The function's standard input.

stdout instance-attribute ¤

stdout: Sequence[str]

The function's standard output.

HistoryTag dataclass ¤

Bases: TextTag

A tag representing a script's history.

Attributes:

LicenseTag dataclass ¤

Bases: TextTag

A tag representing a license.

Attributes:

NameDescTag dataclass ¤

Bases: Tag

A tag holding a name and a description.

Attributes:

description instance-attribute ¤

description: str

The tag description.

name instance-attribute ¤

name: str

The tag name.

NoteTag dataclass ¤

Bases: TextTag

A tag representing a note.

Attributes:

OptionTag dataclass ¤

Bases: Tag

A tag representing a command-line option.

Attributes:

default instance-attribute ¤

default: str

The option default value.

description instance-attribute ¤

description: str

The option description.

group instance-attribute ¤

group: str

The option group.

long instance-attribute ¤

long: str

The option long flag.

positional instance-attribute ¤

positional: str

The option positional arguments.

short instance-attribute ¤

short: str

The option short flag.

signature cached property ¤

signature: str

The signature of the option.

SeealsoTag dataclass ¤

Bases: TextTag

A tag representing "See Also" information.

Attributes:

StderrTag dataclass ¤

Bases: TextTag

A tag representing the standard error of a script/function.

Attributes:

StdinTag dataclass ¤

Bases: TextTag

A tag representing the standard input of a script/function.

Attributes:

StdoutTag dataclass ¤

Bases: TextTag

A tag representing the standard output of a script/function.

Attributes:

Tag ¤

Base class for tags.

Methods:

  • from_lines

    Parse a sequence of lines into a tag instance.

from_lines classmethod ¤

from_lines(lines: Sequence[DocLine]) -> Tag

Parse a sequence of lines into a tag instance.

Parameters:

Returns:

  • Tag

    A tag instance.

Source code in src/shellman/tags.py
20
21
22
23
24
25
26
27
28
29
30
@classmethod
def from_lines(cls, lines: Sequence[DocLine]) -> Tag:
    """Parse a sequence of lines into a tag instance.

    Parameters:
        lines: The sequence of lines to parse.

    Returns:
        A tag instance.
    """
    raise NotImplementedError

TextTag dataclass ¤

Bases: Tag

A simple tag holding text only.

Attributes:

text instance-attribute ¤

text: str

The tag's text.

UsageTag dataclass ¤

Bases: Tag

A tag representing the command-line usage of a script.

Attributes:

command instance-attribute ¤

command: str

The command-line usage.

program instance-attribute ¤

program: str

The program name.

VersionTag dataclass ¤

Bases: TextTag

A tag representing a version.

Attributes: