feat: Winkeyer
This commit is contained in:
@@ -53,7 +53,9 @@ const (
|
||||
//
|
||||
// QRZ.com → APIKey, ForceStationCallsign
|
||||
// Club Log → Email, Password, Callsign, APIKey
|
||||
// LoTW → TQSLPath, StationLocation, KeyPassword (signs+uploads via TQSL)
|
||||
// LoTW → TQSLPath, StationLocation, ForceStationCallsign, KeyPassword
|
||||
// (signs+uploads via TQSL; ForceStationCallsign overrides
|
||||
// STATION_CALLSIGN so one cert can sign F4BPO / F4BPO/P / TM2Q)
|
||||
//
|
||||
// AutoUpload + UploadMode are common to all (timing is per-service, so the
|
||||
// user can run e.g. Club Log immediate and QRZ delayed).
|
||||
@@ -63,7 +65,7 @@ type ServiceConfig struct {
|
||||
Username string `json:"username"` // LoTW website login (for confirmation download)
|
||||
Password string `json:"password"` // Club Log account / LoTW website password
|
||||
Callsign string `json:"callsign"` // Club Log logbook (owner) callsign
|
||||
ForceStationCallsign string `json:"force_station_callsign"` // QRZ
|
||||
ForceStationCallsign string `json:"force_station_callsign"` // QRZ + LoTW: override STATION_CALLSIGN
|
||||
TQSLPath string `json:"tqsl_path"` // LoTW: path to tqsl.exe
|
||||
StationLocation string `json:"station_location"` // LoTW: TQSL Station Location name
|
||||
KeyPassword string `json:"key_password"` // LoTW: certificate private-key password (optional)
|
||||
|
||||
@@ -196,7 +196,8 @@ func (m *Manager) flushLoTWBatch(ids []int64, cfg ServiceConfig) int {
|
||||
if m.deps.ShouldUpload != nil && !m.deps.ShouldUpload(ServiceLoTW, id) {
|
||||
continue
|
||||
}
|
||||
if rec, ok := m.deps.BuildADIF(id, ""); ok {
|
||||
// Override STATION_CALLSIGN so /P etc. signs against the base cert.
|
||||
if rec, ok := m.deps.BuildADIF(id, cfg.ForceStationCallsign); ok {
|
||||
records = append(records, rec)
|
||||
kept = append(kept, id)
|
||||
}
|
||||
@@ -259,8 +260,9 @@ func (m *Manager) upload(svc Service, id int64, cfg ServiceConfig) bool {
|
||||
}
|
||||
res, err = UploadClublog(ctx, m.deps.Client, cfg, record)
|
||||
case ServiceLoTW:
|
||||
// LoTW signs the QSO's own station call via TQSL — no override.
|
||||
record, ok := m.deps.BuildADIF(id, "")
|
||||
// LoTW signs via TQSL; an optional force-call overrides STATION_CALLSIGN
|
||||
// so the same cert can sign F4BPO, F4BPO/P, TM2Q… per profile.
|
||||
record, ok := m.deps.BuildADIF(id, cfg.ForceStationCallsign)
|
||||
if !ok {
|
||||
m.logf("extsvc: %s upload of QSO %d skipped (no record)", svc, id)
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user