diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 09:00:40 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 09:00:40 +0200 |
| commit | e6c5c5e6443345e019549d8b41ffa0c19d050c9f (patch) | |
| tree | 3ccb4be91e079954086ddb8835d21ecc86716663 /test/fixtures | |
| parent | e9dd31b04324d9a95acf6561a4b6ebcee9d3b8c0 (diff) | |
| download | conky-theme-udt-e6c5c5e6443345e019549d8b41ffa0c19d050c9f.tar.gz conky-theme-udt-e6c5c5e6443345e019549d8b41ffa0c19d050c9f.zip | |
feat: parse the cached OWM response
Lua patterns instead of a JSON library: the current-weather response
is flat and known, so six scalars do not justify a dependency. Every
failure path (truncated write, empty file, garbage, an API error body,
nil input) returns nil rather than raising, since a Lua error here is
a blank dashboard.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'test/fixtures')
| -rw-r--r-- | test/fixtures/weather.json | 1 | ||||
| -rw-r--r-- | test/fixtures/weather_truncated.json | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/test/fixtures/weather.json b/test/fixtures/weather.json new file mode 100644 index 0000000..12493b0 --- /dev/null +++ b/test/fixtures/weather.json @@ -0,0 +1 @@ +{"coord":{"lon":11.0,"lat":45.0},"weather":[{"id":501,"main":"Rain","description":"moderate rain","icon":"10d"}],"base":"stations","main":{"temp":18.34,"feels_like":18.11,"temp_min":16.67,"temp_max":19.44,"pressure":1014,"humidity":72},"visibility":10000,"wind":{"speed":4.12,"deg":230},"clouds":{"all":75},"dt":1789625000,"sys":{"type":2,"id":2004688,"country":"XX","sunrise":1789600000,"sunset":1789646000},"timezone":7200,"id":1,"name":"Example City","cod":200} diff --git a/test/fixtures/weather_truncated.json b/test/fixtures/weather_truncated.json new file mode 100644 index 0000000..eb0099a --- /dev/null +++ b/test/fixtures/weather_truncated.json @@ -0,0 +1 @@ +{"coord":{"lon":11.0,"lat":45.0},"weather":[{"id":501,"main":"Rain","descrip |
