chore: release v0.23.2
This commit is contained in:
@@ -648,6 +648,18 @@ func parseShowDX(line string) (Spot, bool) {
|
||||
}
|
||||
|
||||
func parseSpot(line string) (Spot, bool) {
|
||||
// A cluster prints its prompt WITHOUT a trailing newline, so the first spot
|
||||
// to arrive gets glued onto it and the line reads
|
||||
// "login: DX de YO2CK-#: 21074.0 PY4PTO FT8 …". The anchor then fails
|
||||
// and the spot is dropped — silently, apart from an UNPARSED log line.
|
||||
//
|
||||
// Cutting everything ahead of "DX de" rather than un-anchoring the pattern:
|
||||
// an un-anchored match would also accept a talk/announce line that merely
|
||||
// QUOTES a spot, and start injecting other people's conversations as real
|
||||
// spots.
|
||||
if i := strings.Index(line, "DX de"); i > 0 {
|
||||
line = line[i:]
|
||||
}
|
||||
m := spotRE.FindStringSubmatch(line)
|
||||
if m == nil {
|
||||
return Spot{}, false
|
||||
|
||||
@@ -14,6 +14,12 @@ func TestParseSpot(t *testing.T) {
|
||||
`DX de DK0SWL: 14195.5 W1AW CQ Field Day 1745Z`,
|
||||
"W1AW", 14195.5, "20m", "",
|
||||
},
|
||||
{
|
||||
// The cluster prints its prompt with no trailing newline, so the
|
||||
// first spot arrives glued to it. Seen live on 2026-08-02.
|
||||
`login: DX de YO2CK-#: 21074.0 PY4PTO FT8 -16 dB 1733Z`,
|
||||
"PY4PTO", 21074.0, "15m", "",
|
||||
},
|
||||
{
|
||||
`DX de F4XYZ-#: 7074.0 3DA0RU FT8 -10 0823Z JN18`,
|
||||
"3DA0RU", 7074.0, "40m", "JN18",
|
||||
|
||||
Reference in New Issue
Block a user