|
Fetches current weather from OpenWeatherMap into a cache file, meant
to run from conky's ${execi 900 ...}. Writes to a temp file in the
same directory as the target and renames atomically, so a killed or
failed fetch never leaves the widget reading a half-written or error
response. Distinguishes HTTP failure from a 200-with-error-body (a
bad key returns the latter for some endpoints, the former here), and
leaves any existing good cache untouched on either kind of failure.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|