Exemplo n.º 1
0
    parser.add_argument('--call', metavar='CALL')
    parser.add_argument('--adif-summary', dest='adif_from_summary', action='store_true')
    parser.add_argument('--adif', metavar='ADIF', nargs='*')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year), 'thirtyone')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting", file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}
    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
        except FileNotFoundError:
            print('File {} not found; skipping'.format(adif), file=sys.stderr)
Exemplo n.º 2
0
                        dest='adif_from_summary',
                        action='store_true')
    parser.add_argument('--adif', metavar='ADIF', nargs='*')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year), 'tripleplay')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting",
                  file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}
    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
        except FileNotFoundError:
Exemplo n.º 3
0
                        dest='adif_from_summary',
                        action='store_true')
    parser.add_argument('--adif', metavar='ADIF', nargs='*')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year), 'pskfest')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting",
                  file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}
    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
        except FileNotFoundError:
Exemplo n.º 4
0
    parser.add_argument('--call', metavar='CALL')
    parser.add_argument('--adif-summary',
                        dest='adif_from_summary',
                        action='store_true')
    parser.add_argument('--adif', metavar='ADIF', nargs='*')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        conditions = contests.set_conditions(int(args.year), 'tdw')
        conditions = set_member_conditions(int(args.year), conditions)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}
    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
        except FileNotFoundError:
            print('File {} not found; skipping'.format(adif), file=sys.stderr)
        else:
            name = os.path.basename(rootname)
Exemplo n.º 5
0
    parser.add_argument('--adif-summary',
                        dest='adif_from_summary',
                        action='store_true')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    parser.set_defaults(adif_from_summary=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year), 'saintpat')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting",
                  file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}

    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
Exemplo n.º 6
0
                        dest='adif_from_summary',
                        action='store_true')
    parser.add_argument('--adif', metavar='ADIF', nargs='*')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year),
                                                 'greatpumpkin')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting",
                  file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}
    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
        except FileNotFoundError:
Exemplo n.º 7
0
                        dest='adif_from_summary',
                        action='store_true')
    parser.add_argument('--adif', metavar='ADIF', nargs='*')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year), 'jayhudak')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting",
                  file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}
    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
        except FileNotFoundError:
Exemplo n.º 8
0
                        dest='adif_from_summary',
                        action='store_true')
    parser.add_argument('--adif', metavar='ADIF', nargs='*')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year),
                                                 'doubleheader')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting",
                  file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}
    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
        except FileNotFoundError:
Exemplo n.º 9
0
    parser.add_argument('--adif-summary',
                        dest='adif_from_summary',
                        action='store_true')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year), 'vdsprint')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting",
                  file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}

    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
Exemplo n.º 10
0
    parser.add_argument('--call', metavar='CALL')
    parser.add_argument('--adif-summary', dest='adif_from_summary', action='store_true')
    parser.add_argument('--adif', metavar='ADIF', nargs='*')
    parser.add_argument('--debug', dest='debug', action='store_true')
    parser.add_argument('--valid-only', dest='valid_only', action='store_true')
    parser.add_argument('--score-only', dest='score_only', action='store_true')
    parser.set_defaults(debug=False)
    parser.set_defaults(adif_from_summary=False)
    parser.set_defaults(valid_only=False)
    parser.set_defaults(score_only=False)
    args = parser.parse_args()

    if args.year:
        # TODO: Move try block into set_conditions. This is too broad as-is
        try:
            conditions = contests.set_conditions(int(args.year), 'firecracker')
        except ValueError:
            print("Invalid year given (must be in the form YYYY): Exiting", file=sys.stderr)
            exit(1)
    else:
        print("No year given: Exiting", file=sys.stderr)
        exit(1)

    summary = contests.summary_parser(args.summary, args.delim)
    adif_files = {}
    if args.adif_from_summary:
        adif = summary[args.call.upper()]['adif_file']
        try:
            rootname, ext = os.path.splitext(adif)
        except FileNotFoundError:
            print('File {} not found; skipping'.format(adif), file=sys.stderr)