def main(argv):
    parser = argparse.ArgumentParser()

    parser.add_argument(
        "--report-style", choices=['text', 'color-text', 'html'],
        help='Style of report to use',
        default='color-text')
    parser.add_argument(
        '--positions-only', action="store_true",
        help="Only validate that the letters are in their right positions.  "
             "Don't require that they match")
    parser.add_argument(
        '-o', '--output', type=argparse.FileType('w'),
        help='Filename to write the report to')
    tv_driver.add_argparse_argument(parser)

    parser.add_argument("colour", nargs='*')

    args = parser.parse_args(argv[1:])

    if len(args.colour) == 0:
        args.colour = STANDARD_COLOURS.keys()

    driver = tv_driver.create_from_args(args, videos)
    failures = 0
    for c in args.colour:
        failures += validate(c, driver, validate_match=not args.positions_only)
    return failures
Beispiel #2
0
def main(argv):
    parser = argparse.ArgumentParser()

    parser.add_argument(
        "--report-style", choices=["text", "color-text", "html"], help="Style of report to use", default="color-text"
    )
    parser.add_argument(
        "--positions-only",
        action="store_true",
        help="Only validate that the letters are in their right positions.  " "Don't require that they match",
    )
    parser.add_argument("-o", "--output", type=argparse.FileType("w"), help="Filename to write the report to")
    tv_driver.add_argparse_argument(parser)

    parser.add_argument("colour", nargs="*")

    args = parser.parse_args(argv[1:])

    if len(args.colour) == 0:
        args.colour = STANDARD_COLOURS.keys()

    driver = tv_driver.create_from_args(args, videos)
    failures = 0
    for c in args.colour:
        failures += validate(c, driver, validate_match=not args.positions_only)
    return failures
def parse_args(argv):
    parser = _stbt.core.argparser()
    tv_driver.add_argparse_argument(parser)
    parser.add_argument(
        '--noninteractive', action="store_false", dest="interactive",
        help="Don't prompt, assume default answer to all questions")
    parser.add_argument(
        '--skip-geometric', action="store_true",
        help="Don't perform geometric calibration")
    parser.add_argument(
        '--skip-illumination', action='store_true',
        help="Don't perform uniform illumination calibration")
    return parser.parse_args(argv[1:])
def parse_args(argv):
    parser = _stbt.core.argparser()
    tv_driver.add_argparse_argument(parser)
    parser.add_argument(
        '--noninteractive', action="store_false", dest="interactive",
        help="Don't prompt, assume default answer to all questions")
    parser.add_argument(
        '--skip-geometric', action="store_true",
        help="Don't perform geometric calibration")
    parser.add_argument(
        '--skip-illumination', action='store_true',
        help="Don't perform uniform illumination calibration")
    return parser.parse_args(argv[1:])