aboutsummaryrefslogtreecommitdiff
path: root/internal/imgw
Commit message (Collapse)AuthorAgeFilesLines
* privacy: use Krakow in examples, tests and fixturesv0.1.2Lukasz Kasprzak2026-08-252-13/+14
| | | | | | | | | | | | | | | | | | | A recorded GUGiK fixture was a reverse address lookup for the author's home: it carried a house number, a postal code and coordinates to about a metre, and it was published. The place name in the README was the lesser half of the problem. Fixtures are re-recorded against Rynek Glowny in Krakow, a public square, and the tests, spec example and README follow. The README example is regenerated from the binary. warnings.json is left as recorded: it is a verbatim national bulletin whose teryt array lists roughly two hundred powiats, so no single entry says anything about anyone. NOTE: this removes the address from the tip, not from history. Commit e14a7db and its successors still contain it, and remain reachable on any clone or mirror.
* Initial commit: prognosis, the Go implementationLukasz Kasprzak2026-08-134-0/+348
An hour-by-hour forecast for the terminal, with official IMGW warnings for Polish locations. Replaces the Python version, whose cache file format it keeps so the two can coexist until this reaches parity. Open-Meteo provides the forecast, geocoding and pollen; GUGiK turns coordinates into a TERYT powiat code; IMGW supplies the warnings, filtered to that powiat rather than the whole country. Only the two lookups that never change are cached. Forecasts never are. Silence is never allowed to read as all-clear: "no warnings in force" and "the check failed" are reported as distinct states. Place names are resolved without guessing. A name matching several places is refused with a numbered list carrying each candidate's region and coordinates, and -pick N chooses one and remembers it. A stray positional beside -l is an error, so an unquoted "Wiry, PL" cannot silently resolve to somewhere else. The cache is written one entry per line with sorted keys, and treated as disposable but not worthless: an entry that will not parse is skipped and the rest kept, and a file that will not parse at all is moved to cache.json.bad rather than overwritten. No third-party dependencies. `make ci` is the gate: gofmt clean, vet, tests.