feat: upload qrz.com clublog and lotw manually
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -156,8 +157,14 @@ func normalizeNames(r *Result) {
|
||||
r.Name = titleCase(r.Name)
|
||||
r.QTH = titleCase(r.QTH)
|
||||
r.Address = titleCase(r.Address)
|
||||
// 3 decimals (~110 m) is plenty for a contact's coordinates and keeps
|
||||
// the displayed/exported value tidy.
|
||||
r.Lat = round3(r.Lat)
|
||||
r.Lon = round3(r.Lon)
|
||||
}
|
||||
|
||||
func round3(f float64) float64 { return math.Round(f*1000) / 1000 }
|
||||
|
||||
// titleCase lowercases the whole string then capitalises the first letter of
|
||||
// each word. Word boundaries are any non-alphanumeric rune (space, hyphen,
|
||||
// apostrophe, slash…), so "vetraz-monthoux" → "Vetraz-Monthoux" and
|
||||
|
||||
Reference in New Issue
Block a user