summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md68
1 files changed, 47 insertions, 21 deletions
diff --git a/README.md b/README.md
index 0e5cb46..d4ac8d7 100644
--- a/README.md
+++ b/README.md
@@ -11,33 +11,40 @@ No API key. Written in Go with **no third-party modules** — `make ci` fails if
one creeps in.
```
- ! Upał level 1 08-10 11:00 -> 08-10 20:00 (85%)
- Prognozuje się upał. Temperatura maksymalna wyniesie od 30°C do 33°C.
+Krakow, PL Tue 25 Aug 05:37 up 19:32 down GMT+2
+ day 7-21° dry sun 5h09m of 13h54m daylight
+ pollen grass 2.8 low ragweed 1.3 mugwort 0.9 none birch 0.0 none
-Krakow, PL Mon 10 Aug 05:15 up 20:01 down GMT+2
- day 12-30° dry sun 12h24m of 14h45m daylight
- pollen grass 10.5 low mugwort 4.5 low ragweed 1.4
+ hr temp feels conditions hum
+ 15 21° (19) overcast 48%
+ 16 19° (17) 56%
+ 17 18° (17) 63%
+ 18 17° 64%
+ 19 16° 66%
+ 20 16° 65%
+ 21 15° 69%
+ 22 15° (14) 66%
- hr temp feels conditions
- 13 28° part cloudy
- 14 29°
- 15 30° (28) mainly clear
- ...
+ 21°│████████
+ │████████
+ 18°│████████████████▄▄▄▄▄▄▄▄
+ │████████████████████████▄▄▄▄▄▄▄▄
+ 15 17 19 21
+ 15-21°
+```
- 30°│ ▄▄▄▄▄██████████▄▄▄▄▄▄▄▄▄▄
- │▄▄▄▄▄██████████████████████████████▄▄▄▄▄
- 26°│████████████████████████████████████████
- │█████████████████████████████████████████████
- 22°│█████████████████████████████████████████████▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- 12 14 16 18 20 22
- 22-30°
+When IMGW has issued a warning for your powiat, it leads the output:
+
+```
+ ! Upał level 1 08-10 11:00 -> 08-10 20:00 (85%)
+ Prognozuje się upał. Temperatura maksymalna wyniesie od 30°C do 33°C.
```
## Install
make build # build ./prognosis
make install # build and install into ~/.local/bin
- make cross # dist/ binaries for linux-amd64, linux-arm64, android-arm64
+ make cross # dist/ binaries for linux, android, darwin and freebsd
make ci # gofmt, vet, tests, man page, no-dependencies check
make install-hooks # pre-push hook that runs make ci
@@ -116,8 +123,26 @@ than the original.
prognosis 50.0617,19.9373 # or by coordinates
prognosis -n 24 # next 24 hours
prognosis -d 3 # three days, 24h each (max 15)
- prognosis --no-graph # table only
- prognosis --no-color # plain text
+
+Every flag, and every setting in the config file, is documented in
+**`man prognosis`**. In short:
+
+| flag | |
+|---|---|
+| `-l PLACE` | place to query, overriding `location=` |
+| `-pick N` | choose the Nth candidate for an ambiguous name, and remember it |
+| `-n N` / `-d N` | hours, or days of 24 hours |
+| `-columns LIST` | columns to display, in order |
+| `-icons SET` | `nerd`, `emoji` or `none` |
+| `-lang LANG` | `en` or `pl` |
+| `-pollen LIST` | allergens to show: a list, or `all` / `none` |
+| `-weather` | forecast only: no sun times, summary, pollen or chart |
+| `-no-warnings` | omit IMGW warnings |
+| `-no-graph` | table only |
+| `-ascii` | ASCII only, so an SMS stays in GSM-7 |
+| `-no-color` | plain output |
+| `-config` | print the config file path and exit |
+| `-version` | print the version and exit |
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
@@ -156,7 +181,8 @@ Output is pipe-safe: colour switches off when stdout is not a terminal, so
| [IMGW](https://danepubliczne.imgw.pl/) | official meteorological warnings |
Geocoding and TERYT results are cached in `~/.cache/prognosis/cache.json`.
-Forecast, warnings and pollen are fetched every run, so three HTTP calls.
+Forecast, warnings and pollen are fetched every run: three HTTP calls, or four
+when a custom `air:` column is declared.
The cache is written one entry per line with its keys sorted, so it is readable
and hand-editable. It is also treated as disposable but never as worthless: an