tacl.command package¶
Submodules¶
tacl.command.formatters module¶
-
class
tacl.command.formatters.
ParagraphFormatter
(prog, indent_increment=2, max_help_position=24, width=None)[source]¶ Bases:
argparse.ArgumentDefaultsHelpFormatter
argparse formatter to maintain paragraph breaks in text, while wrapping those blocks.
Code minimally adapted from the patch at http://bugs.python.org/file28091, authored by rurpy2.
tacl.command.utils module¶
Functions useful when writing command-line scripts that interact with tacl.
-
tacl.command.utils.
add_corpus_arguments
(parser)[source]¶ Adds common arguments for commands making use of a corpus to parser.
-
tacl.command.utils.
add_db_arguments
(parser, db_option=False)[source]¶ Adds common arguments for the database sub-commands to parser.
db_option provides a means to work around https://bugs.python.org/issue9338 whereby a positional argument that follows an optional argument with nargs=’+’ will not be recognised. When db_optional is True, create the database argument as a required optional argument, rather than a positional argument.
-
tacl.command.utils.
add_query_arguments
(parser)[source]¶ Adds common arguments for query sub-commonads to parser.