diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-05 09:48:13 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-05 09:48:13 -0500 |
| commit | ec00dbe1c03527ec46a0faa20545a7acd382da84 (patch) | |
| tree | 268cd3af685677808654de3f775d60d7693c83ff /scripts/coverage-summary.py | |
| parent | b83865a65eb744f6d36c1c672a4d83a59d6383f8 (diff) | |
| download | emacs-wttrin-ec00dbe1c03527ec46a0faa20545a7acd382da84.tar.gz emacs-wttrin-ec00dbe1c03527ec46a0faa20545a7acd382da84.zip | |
feat: add wttrin-display-options for wttr.in flag customization (closes #3)
wttr.in accepts single-character flags appended to the URL that control what the report looks like — no Follow line (F), narrow output (n), quiet mode (q), forecast horizon (0/1/2), console-glyph mode (d), and so on. Until now wttrin always used the same default report shape with no way to opt into these.
Added a `wttrin-display-options` defcustom that takes a string of concatenated flags, e.g. "0Fq" for current weather only with no Follow line and no header. The flags get appended to every request via `wttrin--build-url`. The defcustom defaults to nil so existing users see no change.
I excluded `A` and `T` from the recommended set in the docstring since wttrin needs ANSI output for the xterm-color rendering to produce the colored glyphs. The user could still pass them, but the docstring nudges them away.
Tests cover the normal cases (single, multi-flag, with and without unit system), the boundaries (nil and empty string both leave the URL unchanged from baseline, single character works), and a sanity check that the new flags slot in after the always-on `A`. Existing build-url tests stay green because they don't bind the new variable, and the default is nil.
Also added `.claude/` to .gitignore — the scheduled-tasks lockfile from local wakeup scheduling shouldn't be tracked.
Diffstat (limited to 'scripts/coverage-summary.py')
0 files changed, 0 insertions, 0 deletions
