Example #1
0
            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)
        else:
            name = os.path.basename(rootname)
            adif_files[name] = adifparser.parse(adif)
    else:
        for adif in args.adif:
            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)
                adif_files[name] = adifparser.parse(adif)

    if len(adif_files) == 0:
        print("No files found: Exiting", file=sys.stderr)
        exit(1)

    valid_entries = None
Example #2
0
#
# WAC
# Work each of the six ham radio world continents (EU, AF, AS, NA, SA and OC)
# on PSK31 and you qualify for the "WAC" endorsement. Use the current ARRL DXCC
# country list for reference.

if __name__ == '__main__':
    import adifparser
    import argparse
    import pprint

    parser = argparse.ArgumentParser(description='Process some integers.')
    parser.add_argument('inputfile', metavar='ADIF')
    args = parser.parse_args()

    records = adifparser.parse(args.inputfile)

    print("checking endorsements in {}".format(args.inputfile))
    print("===== Aloha =====")
    aloha = aloha(records)
    if aloha != None:
        print(
            "\tAloha - PASS: <CALL:{}>{} <BAND:{}>{} <QSO_DATE:{}>{} <TIME_ON:{}>{} <MODE:{}>{}"
            .format(
                aloha['call']['length'],
                aloha['call']['data'],
                aloha['band']['length'],
                aloha['band']['data'],
                aloha['qso_date']['length'],
                aloha['qso_date']['data'],
                aloha['time_on']['length'],