Geektoolで天気アイコン表示
-
前提条件
-
curl
とjq
が使えること -
毎15分でローカルにファイルを落とす様に
cron
設定
*/15 * * * * curl -o ~/Downloads/weather.png "http://openweathermap.org/img/w/`curl -s http://api.openweathermap.org/data/2.5/weather?q = Tokyo,jp | jq '.weather[].icon' | sed 's/"//g'`.png"
- Geeklets => Image で定期ダウンロードさせた画像を指定
- file://localhost/Users/sage0196/Downloads/weather.png