diff --git a/not1mm/lib/plugin_common.py b/not1mm/lib/plugin_common.py index f72a4c1..38d3746 100644 --- a/not1mm/lib/plugin_common.py +++ b/not1mm/lib/plugin_common.py @@ -1,11 +1,47 @@ """Common function(s) for all contest plugins""" import datetime +from dicttoxml import dicttoxml from decimal import Decimal from pathlib import Path from not1mm.lib.ham_utility import get_adif_band +def online_score(self): + """generate online xml""" + + # + # + # CQ-WW-SSB + # VA2WA NR9Q + # + # Contest Group du Quebec + # My logger + # 4.38 + # + # K + # 4 + # 8 + # IL + # IL + # EN40IC + # + # + # 20 + # 13 + # 17 + # 49 + # 1470 + # 2018-10-29 13:20:27 + # + + info = {} + info["contest"] = "CQ-WW-SSB" + info["call"] = "VA2WA" + info["ops"] = "NR9Q" + print(f"{dicttoxml(info, custom_root='dynamicresults', attr_type=False).decode()=}") + + def get_points(self): """Return raw points before mults""" result = self.database.fetch_points() diff --git a/not1mm/plugins/cq_ww_cw.py b/not1mm/plugins/cq_ww_cw.py index 7fdbf18..18979bf 100644 --- a/not1mm/plugins/cq_ww_cw.py +++ b/not1mm/plugins/cq_ww_cw.py @@ -43,7 +43,7 @@ from PyQt6 import QtWidgets -from not1mm.lib.plugin_common import gen_adif, get_points +from not1mm.lib.plugin_common import gen_adif, get_points, online_score from not1mm.lib.version import __version__ from not1mm.lib.ham_utility import get_logged_band