feat: upload to external services clublog qrz

This commit is contained in:
2026-05-28 22:52:50 +02:00
parent e82e30dd02
commit 5c004f5e2f
26 changed files with 1710 additions and 31 deletions
+25 -1
View File
@@ -146,7 +146,11 @@ var dxccByName = map[string]int{
"liechtenstein": 251,
"austria": 206,
"italy": 248,
"sicily": 225,
// Sicily (IT9) and African Italy (IG9/IH9) are cty.dat WAE splits, not
// DXCC entities — they count as Italy (248). Sardinia (IS0) IS its own
// DXCC entity (225) and keeps its number.
"sicily": 248,
"african italy": 248,
"sardinia": 225,
"spain": 281,
"portugal": 272,
@@ -318,3 +322,23 @@ func EntityDXCC(name string) int {
}
return dxccByName[strings.ToLower(strings.TrimSpace(name))]
}
// ctyEntityAliases maps cty.dat's non-DXCC pseudo-entities — the CQ-zone /
// WAE splits AD1C lists separately — onto the ARRL DXCC entity they belong
// to. cty.dat reports e.g. "Sicily" or "Sardinia" so contesters get the
// right zones, but for DXCC (and the COUNTRY field) they are Italy. Add an
// entry here for any other split that should report its parent entity.
var ctyEntityAliases = map[string]string{
"sicily": "Italy",
"african italy": "Italy",
// NB: Sardinia is intentionally absent — it's a real DXCC entity.
}
// CanonicalEntityName normalises a cty.dat entity name to its ARRL DXCC
// entity. Names that already are DXCC entities pass through unchanged.
func CanonicalEntityName(name string) string {
if c, ok := ctyEntityAliases[strings.ToLower(strings.TrimSpace(name))]; ok {
return c
}
return name
}