p12345j2007 wrote:
我怎麼樣都弄不出天氣...(恕刪)
請下載 小弟已經做好的 安裝好 geektool 之後直接點擊 確認 就可執行
重新加以分類與設定所在位置網址即可
附加壓縮檔: 201111/mobile01-088f74053453a53a6c2712752aac715b.zip
請參考裡面 修改到你目前的位置
天氣圖表有時候會改變位址 可以在這輸入中文或英文選 度C 找出相關位置來
http://weather.yahoo.com/taiwan/
第一段 SHELL 天氣圖表位置 2012/05/15 YAHOO氣象新位置
SHELL 天氣圖表位置
http://weather.yahoo.com/taiwan/taipei-city/taipei-city-12703515/ 台北市
http://weather.yahoo.com/taiwan/taichung-city/taichung-city-12703535/ 台中
http://weather.yahoo.com/taiwan/hsinchu-city/hsinchu-city-12703534/ 新竹
http://weather.yahoo.com/taiwan/tainan-city/tainan-city-12703545/ 台南
http://weather.yahoo.com/taiwan/kaohsiung-city/kaohsiung-city-12703552/ 高雄
第三段 SHELL 溫度參考位置
http://weather.yahooapis.com/forecastrss?p=TWXX0001&u=c 彰化
http://weather.yahooapis.com/forecastrss?p=TWXX0009&u=c 新竹
http://weather.yahooapis.com/forecastrss?p=TWXX0011&u=c 花蓮
http://weather.yahooapis.com/forecastrss?p=TWXX0013&u=c 高雄
http://weather.yahooapis.com/forecastrss?p=TWXX0019&u=c 台中
http://weather.yahooapis.com/forecastrss?p=TWXX0020&u=c 台南
http://weather.yahooapis.com/forecastrss?p=TWXX0021&u=c 台北
http://weather.yahooapis.com/forecastrss?p=TWXX0022&u=c 新北市
http://weather.yahooapis.com/forecastrss?p=TWXX0025&u=c 桃園
---- 溫度預測一列修改成為兩列
temp_f=$(curl -s "http://weather.yahooapis.com/forecastrss?p=TWXX0019&u=f" | egrep -o 'temp="[^"]*"' | sed -e 's/temp="//g' -e 's/"//g')°
temp_c=$(curl -s "http://weather.yahooapis.com/forecastrss?p=TWXX0019&u=c" | egrep -o 'temp="[^"]*"' | sed -e 's/temp="//g' -e 's/"//g')°
echo "台中地區攝氏溫度約 $temp_c" C
echo "台中地區華氏溫度約 $temp_f" F
------ 2012/05/15 補充
如果您有下載 本樓附件的朋友
原本的天氣圖表因為 Yahoo天氣改版造成圖示無法顯示
天氣圖表 請改使用下面語法
curl --silent "http://weather.yahooapis.com/forecastrss?p=TWXX0019&u=C" | grep "current-weather" | sed "s/.*background\:url(\'\(.*\)\') .*/\1/" | xargs curl --silent -o /tmp/weather1.png\
圖示更改為
file://localhost/tmp/weather1.png
------
如果你想在天氣圖表顯示的圖示位置是上面所沒有的請在這裡輸入地方名
http://weather.yahoo.com/taiwan/