summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-08-25 15:42:55 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-08-25 15:42:55 +0200
commit92e1106b91f836339a957312a1ea4449c55114c7 (patch)
treeee3726c567054e3f3a4eec692dcf5fb49099318b /README.md
parente14a7db4ffe3c4e0f15f6b37a980501a8d74d26b (diff)
downloadprognosis-6b5c3acaf88783cf2eebd5f036731771a808758a.tar.gz
prognosis-6b5c3acaf88783cf2eebd5f036731771a808758a.zip
Stand alone, document, and let the config show anythingv0.1.1
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.
Diffstat (limited to 'README.md')
-rw-r--r--README.md50
1 files changed, 46 insertions, 4 deletions
diff --git a/README.md b/README.md
index 17ad747..0e5cb46 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,11 @@ Krakow, PL Mon 10 Aug 05:15 up 20:01 down GMT+2
make build # build ./prognosis
make install # build and install into ~/.local/bin
make cross # dist/ binaries for linux-amd64, linux-arm64, android-arm64
- make ci # gofmt, vet, tests, and the no-dependencies check
+ make ci # gofmt, vet, tests, man page, no-dependencies check
+ make install-hooks # pre-push hook that runs make ci
+
+Packagers: `make install PREFIX=/usr DESTDIR=/tmp/pkg` installs the binary and
+`man/prognosis.1`.
Needs `~/.local/bin` on `PATH`. For the phone, copy `dist/prognosis-android-arm64`
across — no interpreter, no shebang, nothing to install.
@@ -62,6 +66,43 @@ blank column.
glyphs are single-width and monochrome, so they follow the terminal palette;
emoji are colour glyphs from a fallback font and are not all one cell wide.
+### Pollen
+
+`pollen=` decides whether the allergen line appears at all and which species it
+carries:
+
+ pollen=none # no pollen line
+ pollen=all # every species that has a reading
+ pollen=birch,mugwort # exactly these, always — even at zero
+
+A species you name is shown even when it reads zero: you named it because you
+react to it, so "none today" is the answer you wanted. With `all` nobody chose,
+so absent species are dropped rather than printing a line of zeroes. `-pollen`
+does the same for one run.
+
+### Custom columns
+
+Any field the two Open-Meteo APIs expose can be displayed, whether or not
+prognosis ships with it. Declare a short name, then use it:
+
+ columns=hour,temp,birch,soil,conditions
+
+ column.birch = air:birch_pollen
+ column.soil = forecast:soil_temperature_0cm
+
+ label.birch = birch
+ decimals.birch = 1
+ suffix.soil = °
+
+`forecast` is the weather API, `air` the air-quality one that carries the
+allergens — they are separate services with separate fields, which is why the
+source is explicit. An `air` column costs one extra request, made only when one
+is declared.
+
+`label.`, `width.`, `decimals.` and `suffix.` are optional. A custom name may
+not shadow a built-in column, and a value the API does not supply renders blank
+rather than as zero: for an allergen, "no data" and "none" are different claims.
+
`display_lang=` is `en` or `pl`, covering everything prognosis writes itself —
headers, condition names, labels, dates, pollen species and bands. **IMGW
publishes its warning text in Polish only**, so that text stays Polish in either
@@ -78,8 +119,9 @@ than the original.
prognosis --no-graph # table only
prognosis --no-color # plain text
-Location comes from `location=` in `~/.wegorc`, so wego and prognosis never
-disagree about where you are. `-l` overrides it for one run.
+Location comes from `location=` in the config file; `-l` overrides it for one
+run. prognosis is standalone — it reads no other program's configuration and
+will not guess where you are.
Quote a name that contains a comma or a space. `-l Wiry, PL` is two arguments
once the shell has finished with it, and prognosis refuses it rather than
@@ -176,7 +218,7 @@ as bare numbers rather than banded on a guess.
- **Open-Meteo hourly arrays start at 00:00 local.** Slicing from the front
reports this morning, not the hours ahead. See `openmeteo.WindowStart`.
- **The table does not shrink to fit.** Column widths are fixed; the default set
- needs 34 columns. `TestTableMinimumWidthIsKnown` pins that figure. Use
+ needs 40 columns. `TestTableMinimumWidthIsKnown` pins that figure. Use
`columns=` for a narrow terminal.
- **GUGiK's default search radius is 100 m**, which finds nothing in the
mountains or deep countryside — indistinguishable from being abroad. The