parent
bb2111e3b8
commit
b5b5f0aeb8
11
README.md
11
README.md
|
@ -5,13 +5,20 @@ This script is a command line DX cluster client. It adds the following benefits
|
||||||
* displays the DX station's country
|
* displays the DX station's country
|
||||||
* displays the DX station's continent
|
* displays the DX station's continent
|
||||||
* displays if the DX station uses LotW
|
* displays if the DX station uses LotW
|
||||||
* downloads your LotW QSL file and marks all lines with countries that need to be confirmed
|
* downloads your LotW QSL file and marks all lines with countries that need to be confirmed (optional)
|
||||||
* displays lines in different colors depending on the continent or band (user configurable)
|
* displays lines in different colors depending on the continent or band (user configurable)
|
||||||
|
|
||||||
# Screnshot
|
# Screnshot
|
||||||
|
|
||||||
![screenshot](/screenshot.png?raw=true "screenshot")
|
![screenshot](/screenshot.png?raw=true "screenshot")
|
||||||
|
|
||||||
|
# Limitations
|
||||||
|
|
||||||
|
The following limitations are present:
|
||||||
|
|
||||||
|
* read-only: you can't send commands to the dx cluster server via this tool
|
||||||
|
* no filters: you need to configure your filter on the server
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
ColorSpot needs Python 3 and the following libraries:
|
ColorSpot needs Python 3 and the following libraries:
|
||||||
|
@ -48,7 +55,7 @@ To update colorspot, execute the following command:
|
||||||
* adapt _~/.colorspot.ini_ to your needs. Important setting are:
|
* adapt _~/.colorspot.ini_ to your needs. Important setting are:
|
||||||
* cluster/host and cluster/port: Change this if you want to use another cluster server
|
* cluster/host and cluster/port: Change this if you want to use another cluster server
|
||||||
* cluster/user: Enter here your call sign
|
* cluster/user: Enter here your call sign
|
||||||
* lotw/user: Enter here your lotw user name (your call sign)
|
* lotw/user: Enter here your lotw user name (your call sign). Leave at "N0CALL" to disable this feature.
|
||||||
* lotw/password: Enter here your lotw password
|
* lotw/password: Enter here your lotw password
|
||||||
* lotw/mode: Enter here the mode you would like to filter the QSL download from LotW
|
* lotw/mode: Enter here the mode you would like to filter the QSL download from LotW
|
||||||
* execute the application again with "colorspot"
|
* execute the application again with "colorspot"
|
||||||
|
|
|
@ -57,13 +57,17 @@ class ColorSpot():
|
||||||
|
|
||||||
self.check_files()
|
self.check_files()
|
||||||
|
|
||||||
if self.check_lotw_confirmed:
|
if self.config['lotw']['user'] != "N0CALL" and self.check_lotw_confirmed:
|
||||||
self.confirmed_entities = self.get_confirmed_entities()
|
self.confirmed_entities = self.get_confirmed_entities()
|
||||||
|
|
||||||
if self.check_cty:
|
if self.check_cty:
|
||||||
with open(self.config_dir + self.config['files']['cty'], encoding='us-ascii') as csvfile:
|
with open(self.config_dir + self.config['files']['cty'], encoding='us-ascii') as csvfile:
|
||||||
self.cty = list(csv.reader(csvfile, delimiter=','))
|
self.cty = list(csv.reader(csvfile, delimiter=','))
|
||||||
|
|
||||||
|
if self.check_lotw_activity:
|
||||||
|
with open(self.config_dir + self.config['files']['lotw_activity'], encoding='us-ascii') as csvfile:
|
||||||
|
self.lotw_activity = list(csv.reader(csvfile, delimiter=','))
|
||||||
|
|
||||||
|
|
||||||
def print_banner(self):
|
def print_banner(self):
|
||||||
"""print an awesome banner"""
|
"""print an awesome banner"""
|
||||||
|
@ -163,6 +167,7 @@ class ColorSpot():
|
||||||
Downloads all files and unzips them (if necessary)"""
|
Downloads all files and unzips them (if necessary)"""
|
||||||
|
|
||||||
# check for lotw qsl information file
|
# check for lotw qsl information file
|
||||||
|
if self.config['lotw']['user'] != "N0CALL":
|
||||||
self.check_lotw_confirmed = exists(self.config_dir + self.config['files']['lotw_confirmed'])
|
self.check_lotw_confirmed = exists(self.config_dir + self.config['files']['lotw_confirmed'])
|
||||||
if not self.check_lotw_confirmed:
|
if not self.check_lotw_confirmed:
|
||||||
print("The file " + self.config_dir + self.config['files']['lotw_confirmed'] + " is missing.")
|
print("The file " + self.config_dir + self.config['files']['lotw_confirmed'] + " is missing.")
|
||||||
|
@ -179,6 +184,8 @@ class ColorSpot():
|
||||||
print("File successfully downloaded")
|
print("File successfully downloaded")
|
||||||
else:
|
else:
|
||||||
print("something went wrong while downloading " + url)
|
print("something went wrong while downloading " + url)
|
||||||
|
else:
|
||||||
|
self.check_lotw_confirmed = False
|
||||||
|
|
||||||
# check for cty.csv file
|
# check for cty.csv file
|
||||||
self.check_cty = exists(self.config_dir + self.config['files']['cty'])
|
self.check_cty = exists(self.config_dir + self.config['files']['cty'])
|
||||||
|
@ -228,10 +235,7 @@ class ColorSpot():
|
||||||
"""Reads the LotW user activity file and returns the date
|
"""Reads the LotW user activity file and returns the date
|
||||||
of the last upload date if a specific call sign"""
|
of the last upload date if a specific call sign"""
|
||||||
ret = ""
|
ret = ""
|
||||||
with open(self.config_dir + self.config['files']['lotw_activity'], encoding='us-ascii') as csvfile:
|
for row in self.lotw_activity:
|
||||||
csv_file = csv.reader(csvfile, delimiter=',')
|
|
||||||
#loop through the csv file
|
|
||||||
for row in csv_file:
|
|
||||||
if call == row[0]:
|
if call == row[0]:
|
||||||
ret = row[1]
|
ret = row[1]
|
||||||
return ret
|
return ret
|
||||||
|
@ -328,7 +332,7 @@ class ColorSpot():
|
||||||
|
|
||||||
# If the DX station's entity hasn't been worked/confirmed via
|
# If the DX station's entity hasn't been worked/confirmed via
|
||||||
# LotW yet, the row's background will be color coded.
|
# LotW yet, the row's background will be color coded.
|
||||||
if self.check_lotw_confirmed and \
|
if self.check_lotw_confirmed and self.config['lotw']['user'] != "N0CALL" and \
|
||||||
cty_details[2] not in self.confirmed_entities:
|
cty_details[2] not in self.confirmed_entities:
|
||||||
background = self.config['colors']['alert_bg']
|
background = self.config['colors']['alert_bg']
|
||||||
foreground = self.config['colors']['alert_fg']
|
foreground = self.config['colors']['alert_fg']
|
||||||
|
|
Loading…
Reference in New Issue