feat: upload to external services clublog qrz
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user