Ejemplo n.º 1
0
def command_line_options():
    """
    The main command line parser, this creates the main parser and calls the
    calls the command_line_options method for each command.
    """
    desc = "MooseDocs: A utility to build MOOSE documentation from a single source."
    parser = argparse.ArgumentParser(description=desc)
    subparser = parser.add_subparsers(dest='command',
                                      help='Available commands.')

    # Common arguments
    parent = argparse.ArgumentParser(add_help=False)
    levels = ['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG']
    parent.add_argument(
        '--level',
        '-l',
        choices=levels,
        default='INFO',
        help="Set the python logging level (default: %(default)s).")

    build.command_line_options(subparser, parent)
    devel.command_line_options(subparser, parent)
    check.command_line_options(subparser, parent)
    update.command_line_options(subparser, parent)

    return parser.parse_args()
Ejemplo n.º 2
0
def command_line_options():
    """
    The main command line parser, this creates the main parser and calls the
    calls the command_line_options method for each command.
    """
    desc = "MooseDocs: A utility to build MOOSE documentation from a single source."
    parser = argparse.ArgumentParser(description=desc)
    subparser = parser.add_subparsers(dest='command', help='Available commands.')

    # Common arguments
    parent = argparse.ArgumentParser(add_help=False)
    levels = ['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG']
    parent.add_argument('--level', '-l',
                        choices=levels,
                        default='INFO',
                        help="Set the python logging level (default: %(default)s).")

    build.command_line_options(subparser, parent)
    check.command_line_options(subparser, parent)
    verify.command_line_options(subparser, parent)
    return parser.parse_args()