class documentation

Base class for all subcommands of NestedTextTo.

Method dump Read NestedText from stdin or input_files, and send another format to stdout.
Constant DESCRIPTION_MORE_TMPL Undocumented
Constant DOCSTRING_TMPL Undocumented
Constant OTHER_FORMAT Undocumented

Inherited from Subcommand:

Constant ALLOW_ABBREV Undocumented

Inherited from Command (via Subcommand):

Constant COLOR_GROUPS Undocumented
Constant SUBCOMMAND_HELPMSG Undocumented
Constant VERSION Undocumented
def dump(self, *, input_files: LocalPath, dump_stdout: Callable[[TypedData], None], dump_str: Callable[[TypedData], str], fmt: str, converter: Converter, fix_data: Callable[[TypedData], TypedData] | None = None): (source)

Read NestedText from stdin or input_files, and send another format to stdout.

Parameters
input_files:LocalPathLocalPaths with NestedText content.
dump_stdout:Callable[[TypedData], None]A function to dump the data to stdout, plainly.
dump_str:Callable[[TypedData], str]A function to dump the data to a string, also plain, for potential colorizing.
fmt:strThe format to use for dumping (e.g., 'toml').
converter:ConverterA Converter used to unstructure the result to match specific type support.
fix_data:Callable[[TypedData], TypedData] | NoneA function to fix the data, post-uptyping, if necessary.
DESCRIPTION_MORE_TMPL: str = (source)

Undocumented

Value
'''
Examples:
    - nt2 {subcommand} config.nt
    - cat config.nt | nt2 {subcommand}
'''
DOCSTRING_TMPL: str = (source)

Undocumented

Value
'Read NestedText and output its content as {other_format}.'