educe.rst_dt.util package

Submodules

educe.rst_dt.util.args module

Command line options

educe.rst_dt.util.args.add_usual_input_args(parser)

Augment a subcommand argparser with typical input arguments. Sometimes your subcommand may require slightly different output arguments, in which case, just don’t call this function.

:param doc_subdoc_required force user to supply –doc/–subdoc
for this subcommand

:type doc_subdoc_required bool

:param help_suffix appended to –doc/–subdoc help strings :type help_suffix string

educe.rst_dt.util.args.add_usual_output_args(parser)

Augment a subcommand argparser with typical output arguments, Sometimes your subcommand may require slightly different output arguments, in which case, just don’t call this function.

educe.rst_dt.util.args.announce_output_dir(output_dir)

Tell the user where we saved the output

educe.rst_dt.util.args.get_output_dir(args)

Return the output directory specified on (or inferred from) the command line arguments, creating it if necessary.

We try the following in order:

  1. If –output is given explicitly, we’ll just use/create that

2. OK just make a temporary directory. Later on, you’ll probably want to call announce_output_dir.

educe.rst_dt.util.args.read_corpus(args, verbose=True)

Read the section of the corpus specified in the command line arguments.