diff --git a/setup.cfg b/setup.cfg index c855c16..bcc3c4b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = colorspot -version = 0.1.5 +version = 0.1.6 author = Michael Clemens author_email = colorspot@qrz.is description = A colorful CLI DX cluster client with LotW integration diff --git a/src/colorspot/__init__.py b/src/colorspot/__init__.py index 0e56af6..92027a0 100644 --- a/src/colorspot/__init__.py +++ b/src/colorspot/__init__.py @@ -1,3 +1,3 @@ from colorspot.__main__ import ColorSpot -__version__ = '0.1.5' +__version__ = '0.1.6' diff --git a/src/colorspot/__main__.py b/src/colorspot/__main__.py index bf81070..ed1b1d5 100755 --- a/src/colorspot/__main__.py +++ b/src/colorspot/__main__.py @@ -268,7 +268,8 @@ class ColorSpot(): while True: line_enc = telnet.read_until(b"\n") # Read one line try: - line = line_enc.decode('ascii') + #line = line_enc.decode('ascii') + line = line_enc.decode('utf-8') except: print("Error while encoding the following line:") print(line_enc) @@ -298,7 +299,8 @@ class ColorSpot(): call_de = re.search('D(X|x) de (.+?): ', line).group(2) freq = re.search(': +(.+?) ', line).group(1) call_dx = re.search(freq + ' +(.+?) ', line).group(1) - time = re.search('[^ ]*$', line).group(0)[0:4] + #time = re.search('[^ ]*$', line).group(0)[0:4] + time = re.search(' (\d{4})Z', line).group(1) comment = re.search(call_dx + ' +(.+?) +' + time, line).group(1) # If the CTY file is available, further information will be @@ -317,7 +319,7 @@ class ColorSpot(): if self.check_lotw_activity and self.check_lotw(call_dx): lotw = "✓" else: - lotw = "" + lotw = " " # Depending on the user's choice, the row will be color coded # depending on the band or the DX station's continent