Download and compare ADIF files from PSK Reporter

A map display of PSK reporter is useful for comparing your receiver performance with that of your local stations.

Furthermore, you can download ADIF files of the report from other stations by clicking “Show logbook -> Download ADIF files -> last 24 hours, last week”.

import re
 
file_name1 = 'mystation.adif'
file_name2 = 'hisstation.adif'
 
def parse_adif(fn):
    raw = re.split('<eor>|<eoh>',open(fn).read() )
    raw.pop(0)
    raw.pop()
    logbook =[]
    for record in raw:
        qso = {}
        tags = re.findall('<(.*?):(\d+).*?>([^<\t\n\r\f\v]+)',record)
        for tag in tags:
            qso[tag[0]] = tag[2]
        logbook.append(qso)    
    return logbook
 
l1 = parse_adif(file_name1)
l2 = parse_adif(file_name2)

pattern = r"7." # 7MHz band only

for qso in l1:
    if re.match(pattern, qso['FREQ']):
        print ('+', qso['CALL'])
for qso in l2:
    if re.match(pattern, qso['FREQ']):
        print ('*', qso['CALL'])

Here is a short python program to extract information from two ADIF files, typically of your own and of your local station.

% python3 adif_parse.py  > ttt.txt
% grep + ttt.txt | sort | uniq -c | grep -e ' [KWN]' | sort -r
  22 + WD6DBM
  18 + KC7UG
   8 + N7TM
   8 + N5DG
   7 + KW6S
   7 + KN7D
   7 + KE8FT
   6 + N7FN
   6 + KF7PG
   6 + KA7T
   5 + KF5ZTQ
   5 + KE7UIU

% grep '\*' ttt.txt | sort | uniq -c | grep -e ' [KWN]' | sort -r
  15 * N6QQ
  14 * KC7UG
  13 * KN7D
  12 * N7MDW
  11 * K6KY
  10 * N7TR
   9 * N9BD
   9 * N7IY
   9 * K2ANT
   8 * KE7W
   7 * KD7H
   7 * K6TE

The numbers show how many times the DX stations are reported.

Leave a Reply

Your email address will not be published. Required fields are marked *