Skip to content

Commit

Permalink
Merge pull request #235 from alduhoo/alduhoo/adif/stationCallsign
Browse files Browse the repository at this point in the history
Add STATION_CALLSIGN field to ADIF output
  • Loading branch information
mbridak authored Dec 5, 2024
2 parents c889445 + 87300e1 commit 7e62fd9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion not1mm/lib/plugin_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ def gen_adif(self, cabrillo_name: str, contest_id=""):
"""
now = datetime.datetime.now()
date_time = now.strftime("%Y-%m-%d_%H-%M-%S")
station_callsign = self.station.get('Call', '').upper()
filename = (
str(Path.home())
+ "/"
+ f"{self.station.get('Call', '').upper()}_{cabrillo_name}_{date_time}.adi"
+ f"{station_callsign}_{cabrillo_name}_{date_time}.adi"
)
log = self.database.fetch_all_contacts_asc()
try:
Expand Down Expand Up @@ -71,6 +72,15 @@ def gen_adif(self, cabrillo_name: str, contest_id=""):
except TypeError:
...

try:
print(
f"<STATION_CALLSIGN:{len(station_callsign)}>{station_callsign}",
end="\r\n",
file=file_descriptor,
)
except TypeError:
...

try:
print(
f"<CALL:{len(hiscall)}>{hiscall.upper()}",
Expand Down

0 comments on commit 7e62fd9

Please sign in to comment.