| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding a flag and forgetting the man page was the kind of thing only a reader
would catch, and the README had already drifted: it documented seven of fifteen
flags, claimed three cross-compilation targets where the Makefile builds six,
and its example output predated the humidity column.
Flag definitions move into defineFlags(), so the test enumerates the same set
run() does rather than a hand-copied list that could drift in its own right.
usage() gains a writer so its output can be captured. Tests then assert that
every flag reaches -h, the README and the man page; that every key written into
the generated config is documented; and that every column name is explained.
The man page check normalises roff's \- hyphen escape first -- without that,
every multi-word flag looks undocumented when it is not.
|
| |
|
|
|
|
|
|
|
|
|
| |
The example output predated the humidity column and the cross target listed
three platforms where the Makefile builds six. It also documented seven of
fifteen flags, and said three HTTP calls per run when a custom air: column
makes four.
The forecast sample is now real output rather than a hand-written one, so it
cannot drift from the program again without someone noticing, and the flag
list is complete with a pointer to prognosis(1) for the detail.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
prognosis no longer reads ~/.wegorc. Falling back to another program's
configuration made it useless without wego installed, and hid the fact that
it has no way to know where you are: location= is now required in its own
config, and the error says so and shows how to set it.
Custom columns. Any field the two Open-Meteo APIs expose can be displayed by
declaring it -- column.birch = air:birch_pollen -- and then naming it in
columns=. The source is explicit because forecast and air-quality are separate
services with separate fields; an air column costs one extra request, made only
when one is declared. Air values merge onto forecast hours by timestamp rather
than array index, since nothing guarantees the two endpoints start at the same
hour and merging by position would shift a column by an hour unnoticed. A value
the API withholds renders blank, not zero: for an allergen those are different
claims.
Pollen selection no longer privileges grass. A species named in pollen= is
shown even at zero, because you named it for a reason; pollen=all shows only
what is present, or the line is six zeroes. Grass had been special-cased, which
forced it on someone allergic to birch while hiding theirs.
Temperature colours are compared in Celsius whatever the display units. In
imperial, 85F -- a mild 29C -- was rendering in the red that means IMGW would
issue a heat warning.
A man page, checked by make lint and installed by make install. The Makefile
gains PREFIX/DESTDIR for packaging, a version stamped into the binary, a
release target that refuses to tag a dirty tree or a version with no changelog
entry, cross-compilation for six platforms, and a pre-push hook.
Also: humidity in the default columns, -weather for output meant for someone
else, -ascii so an SMS stays in GSM-7 rather than dropping to 70-character
UCS-2 segments, and -pollen and -version.
|
|
|
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.
|