VL
Size: a a a
VL
AC
AC
AC
VL
AC
A
A
AC
A
A
A
AC
A
AC
A
A
P
AC
(defun ult/get-weather (&rest params)
"Get weather"
(let*
((city_name (plist-get params :city))
(format_str (plist-get params :format))
(timeout_val (plist-get params :timeout))
(wttr_url "https://wttr.in/"))
(with-temp-buffer
(call-process "curl" nil (buffer-name) nil
"--silent"
"--connect-timeout" "5"
(url-encode-url (concat wttr_url city_name "?format=" format_str)))
(buffer-string))))
(defun ult/get-weather-agenda ()
"Return weather string for agenda/capture"
(ult/get-weather :city "Singapore" :format "%t, %C, wind %w, humidity %h"))