Omnios
July 7th, 2007, 10:47 PM
Hi I have been using Ubuntu for a long time and have used gnome-applet with a entry for a town that is about 50 or so clicks away. Anyways got mad today and did a bunch of searching and hacking for a solution.
This is not a cut and past hack!
Warning Back up your Locations.xml before tweeking it may get Borked
Hacking the Gnome-applet is very dirty as there is nothing straight forward about it.
Forget using web local codes as the applet uses the aviation TAF and METAR standards.
There is a lot of info in the two wiki links provided.
http://en.wikipedia.org/wiki/METAR
http://en.wikipedia.org/wiki/Terminal_Aerodrome_Forecast
there is also a weather radar map standard but have not played with that yet.
Now the hardest part of this is searching for the code for your local area which will be any local airport thought it is only easy to find big airports so you might have to do some digging for the code.
Basiclly so far I have only copied an existing city and changed the town name / names and changed the <CODE> ....... </CODE> which gives working weather. I still have to figure out the
<coordinates>45-19N 075-40W</coordinates>
and the codes for the radar and am hoping for some help on this. I tried doing this hack a long time ago and found nothing on it till now as I figured out the aviation standard used. SO so far TAF is the main weather code for the location. METAR seems to be the coordinates but what I have seen online for my city looks different from the examples from the config file.
Now this is the dirty part which consists of tweeking the the following config file.
/usr/share/gnome-applets/gweather
Locations.xml is the file that is modified. You will have to open it as gedit-root etc to save it.
I copied an existing entry in the province I live in starting at <location> and ending at </location>
<location>
<name>Ottawa</name>
<name xml:lang="ar">أوتاوا</name>
<name xml:lang="az">Ottawa</name>
<name xml:lang="bg">Отава</name>
<name xml:lang="bn">ওটাওয়া</name>
<name xml:lang="bn_IN">ওটাওয়া</name>
<name xml:lang="bs">Otava (Ottawa)</name>
<name xml:lang="ca">Ottawa</name>
<name xml:lang="cs">Ottawa</name>
<name xml:lang="cy">Ottawa</name>
<name xml:lang="da">Ottawa</name>
<name xml:lang="de">Ottawa</name>
<name xml:lang="dz">ཨོ་ཊ་ཝ།</name>
<name xml:lang="el">Οττάβα</name>
<name xml:lang="en_CA">Ottawa</name>
<name xml:lang="en_GB">Ottawa</name>
<name xml:lang="es">Ottawa</name>
<name xml:lang="et">Ottawa</name>
<name xml:lang="eu">Ottawa</name>
<name xml:lang="fa">اوتاوا</name>
<name xml:lang="fi">Ottawa</name>
<name xml:lang="fr">Ottawa</name>
<name xml:lang="gl">Ottawa</name>
<name xml:lang="gu">ઓટાવા</name>
<name xml:lang="he">Ottawa</name>
<name xml:lang="hi">ओटावा</name>
<name xml:lang="hr">Ottawa</name>
<name xml:lang="hu">Ottawa</name>
<name xml:lang="id">Ottawa</name>
<name xml:lang="it">Ottawa</name>
<name xml:lang="ja">オタワ</name>
<name xml:lang="ka">ოტავა</name>
<name xml:lang="ko">오타와</name>
<name xml:lang="ky">Оттава</name>
<name xml:lang="lt">Otava</name>
<name xml:lang="lv">Ottawa</name>
<name xml:lang="mg">Ottawa</name>
<name xml:lang="mk">Ottawa</name>
<name xml:lang="ml">ഓട്ടാവാ</name>
<name xml:lang="mn">Ottawa</name>
<name xml:lang="mr">ओटावा</name>
<name xml:lang="nb">Ottawa</name>
<name xml:lang="ne">ओट्टावा</name>
<name xml:lang="nl">Ottawa</name>
<name xml:lang="nn">Ottawa</name>
<name xml:lang="or">ଓଟାଓ୍ବା</name>
<name xml:lang="pa">ਉਟਾਵਾ</name>
<name xml:lang="pl">Ottawa</name>
<name xml:lang="pt">Ottawa</name>
<name xml:lang="pt_BR">Ottawa</name>
<name xml:lang="ro">Ottawa</name>
<name xml:lang="ru">Оттава</name>
<name xml:lang="sl">Ottawa</name>
<name xml:lang="sq">Ottawa</name>
<name xml:lang="sr">Отава</name>
<name xml:lang="sr@Latn">Otava</name>
<name xml:lang="sv">Ottawa</name>
<name xml:lang="ta">ஒட்டாவா</name>
<name xml:lang="te">ఓటావా</name>
<name xml:lang="th">ออตตาวา</name>
<name xml:lang="tr">Ottawa</name>
<name xml:lang="uk">Оттава</name>
<name xml:lang="vi">Ottawa</name>
<name xml:lang="zh_CN">渥太华</name>
<name xml:lang="zh_HK">渥太華</name>
<name xml:lang="zh_TW">渥太華</name>
<code>CYOW</code>
<radar>tyx</radar>
<coordinates>45-19N 075-40W</coordinates>
</location> Now this is what I ended up inserting a copy and modding it.
<location>
<name>Oshawa</name>
<name xml:lang="ar">Oshawa</name>
<name xml:lang="az">Oshawa</name>
<name xml:lang="bg">Oshawa</name>
<name xml:lang="bn">ওটাওয়া</name>
<name xml:lang="bn_IN">ওটাওয়া</name>
<name xml:lang="bs">Oshawa</name>
<name xml:lang="ca">Oshawa</name>
<name xml:lang="cs">Ottawa</name>
<name xml:lang="cy">Ottawa</name>
<name xml:lang="da">Ottawa</name>
<name xml:lang="de">Ottawa</name>
<name xml:lang="dz">ཨོ་ཊ་ཝ།</name>
<name xml:lang="el">Οττάβα</name>
<name xml:lang="en_CA">Oshawa</name>
<name xml:lang="en_GB">Oshawa</name>
<name xml:lang="es">Oshawa</name>
<name xml:lang="et">Ottawa</name>
<name xml:lang="eu">Oshawa</name>
<name xml:lang="fa">اوتاوا</name>
<name xml:lang="fi">Ottawa</name>
<name xml:lang="fr">Oshawa</name>
<name xml:lang="gl">Ottawa</name>
<name xml:lang="gu">ઓટાવા</name>
<name xml:lang="he">Ottawa</name>
<name xml:lang="hi">ओटावा</name>
<name xml:lang="hr">Ottawa</name>
<name xml:lang="hu">Ottawa</name>
<name xml:lang="id">Ottawa</name>
<name xml:lang="it">Ottawa</name>
<name xml:lang="ja">オタワ</name>
<name xml:lang="ka">ოტავა</name>
<name xml:lang="ko">오타와</name>
<name xml:lang="ky">Оттава</name>
<name xml:lang="lt">Otava</name>
<name xml:lang="lv">Ottawa</name>
<name xml:lang="mg">Ottawa</name>
<name xml:lang="mk">Ottawa</name>
<name xml:lang="ml">ഓട്ടാവാ</name>
<name xml:lang="mn">Ottawa</name>
<name xml:lang="mr">ओटावा</name>
<name xml:lang="nb">Ottawa</name>
<name xml:lang="ne">ओट्टावा</name>
<name xml:lang="nl">Ottawa</name>
<name xml:lang="nn">Ottawa</name>
<name xml:lang="or">ଓଟାଓ୍ବା</name>
<name xml:lang="pa">ਉਟਾਵਾ</name>
<name xml:lang="pl">Ottawa</name>
<name xml:lang="pt">Ottawa</name>
<name xml:lang="pt_BR">Ottawa</name>
<name xml:lang="ro">Ottawa</name>
<name xml:lang="ru">Оттава</name>
<name xml:lang="sl">Ottawa</name>
<name xml:lang="sq">Ottawa</name> <name xml:lang="en_CA">Oshawa</name>
<name xml:lang="en_GB">Oshawa</name>
<name xml:lang="sr">Отава</name>
<name xml:lang="sr@Latn">Otava</name>
<name xml:lang="sv">Ottawa</name>
<name xml:lang="ta">ஒட்டாவா</name>
<name xml:lang="te">ఓటావా</name>
<name xml:lang="th">ออตตาวา</name>
<name xml:lang="tr">Ottawa</name>
<name xml:lang="uk">Оттава</name>
<name xml:lang="vi">Ottawa</name>
<name xml:lang="zh_CN">渥太华</name>
<name xml:lang="zh_HK">渥太華</name>
<name xml:lang="zh_TW">渥太華</name>
<code>CYKZ</code>
<radar>tyx</radar>
<coordinates>45-19N 075-40W</coordinates>
</location>
<location>
K now there are a few tweeks here one of which is the city name
<name>Oshawa</name>
Also to make it so you can choose your new town entry you must modify the name for the language you are using.
I need someone to give the US language abbreviation as I live in Canada.
<name xml:lang="en_CA">Oshawa</name>
<name xml:lang="en_GB">Oshawa</name>
Now this is the part to get your local weather
<code>CYKZ</code>
This is the TAF code you need to look up on the net which may be difficult. You could also possibly phone your local airport for the info you need.
Warning Back up your Locations.xml before tweeking it may get Borked
Happy Hacking!
This is not a cut and past hack!
Warning Back up your Locations.xml before tweeking it may get Borked
Hacking the Gnome-applet is very dirty as there is nothing straight forward about it.
Forget using web local codes as the applet uses the aviation TAF and METAR standards.
There is a lot of info in the two wiki links provided.
http://en.wikipedia.org/wiki/METAR
http://en.wikipedia.org/wiki/Terminal_Aerodrome_Forecast
there is also a weather radar map standard but have not played with that yet.
Now the hardest part of this is searching for the code for your local area which will be any local airport thought it is only easy to find big airports so you might have to do some digging for the code.
Basiclly so far I have only copied an existing city and changed the town name / names and changed the <CODE> ....... </CODE> which gives working weather. I still have to figure out the
<coordinates>45-19N 075-40W</coordinates>
and the codes for the radar and am hoping for some help on this. I tried doing this hack a long time ago and found nothing on it till now as I figured out the aviation standard used. SO so far TAF is the main weather code for the location. METAR seems to be the coordinates but what I have seen online for my city looks different from the examples from the config file.
Now this is the dirty part which consists of tweeking the the following config file.
/usr/share/gnome-applets/gweather
Locations.xml is the file that is modified. You will have to open it as gedit-root etc to save it.
I copied an existing entry in the province I live in starting at <location> and ending at </location>
<location>
<name>Ottawa</name>
<name xml:lang="ar">أوتاوا</name>
<name xml:lang="az">Ottawa</name>
<name xml:lang="bg">Отава</name>
<name xml:lang="bn">ওটাওয়া</name>
<name xml:lang="bn_IN">ওটাওয়া</name>
<name xml:lang="bs">Otava (Ottawa)</name>
<name xml:lang="ca">Ottawa</name>
<name xml:lang="cs">Ottawa</name>
<name xml:lang="cy">Ottawa</name>
<name xml:lang="da">Ottawa</name>
<name xml:lang="de">Ottawa</name>
<name xml:lang="dz">ཨོ་ཊ་ཝ།</name>
<name xml:lang="el">Οττάβα</name>
<name xml:lang="en_CA">Ottawa</name>
<name xml:lang="en_GB">Ottawa</name>
<name xml:lang="es">Ottawa</name>
<name xml:lang="et">Ottawa</name>
<name xml:lang="eu">Ottawa</name>
<name xml:lang="fa">اوتاوا</name>
<name xml:lang="fi">Ottawa</name>
<name xml:lang="fr">Ottawa</name>
<name xml:lang="gl">Ottawa</name>
<name xml:lang="gu">ઓટાવા</name>
<name xml:lang="he">Ottawa</name>
<name xml:lang="hi">ओटावा</name>
<name xml:lang="hr">Ottawa</name>
<name xml:lang="hu">Ottawa</name>
<name xml:lang="id">Ottawa</name>
<name xml:lang="it">Ottawa</name>
<name xml:lang="ja">オタワ</name>
<name xml:lang="ka">ოტავა</name>
<name xml:lang="ko">오타와</name>
<name xml:lang="ky">Оттава</name>
<name xml:lang="lt">Otava</name>
<name xml:lang="lv">Ottawa</name>
<name xml:lang="mg">Ottawa</name>
<name xml:lang="mk">Ottawa</name>
<name xml:lang="ml">ഓട്ടാവാ</name>
<name xml:lang="mn">Ottawa</name>
<name xml:lang="mr">ओटावा</name>
<name xml:lang="nb">Ottawa</name>
<name xml:lang="ne">ओट्टावा</name>
<name xml:lang="nl">Ottawa</name>
<name xml:lang="nn">Ottawa</name>
<name xml:lang="or">ଓଟାଓ୍ବା</name>
<name xml:lang="pa">ਉਟਾਵਾ</name>
<name xml:lang="pl">Ottawa</name>
<name xml:lang="pt">Ottawa</name>
<name xml:lang="pt_BR">Ottawa</name>
<name xml:lang="ro">Ottawa</name>
<name xml:lang="ru">Оттава</name>
<name xml:lang="sl">Ottawa</name>
<name xml:lang="sq">Ottawa</name>
<name xml:lang="sr">Отава</name>
<name xml:lang="sr@Latn">Otava</name>
<name xml:lang="sv">Ottawa</name>
<name xml:lang="ta">ஒட்டாவா</name>
<name xml:lang="te">ఓటావా</name>
<name xml:lang="th">ออตตาวา</name>
<name xml:lang="tr">Ottawa</name>
<name xml:lang="uk">Оттава</name>
<name xml:lang="vi">Ottawa</name>
<name xml:lang="zh_CN">渥太华</name>
<name xml:lang="zh_HK">渥太華</name>
<name xml:lang="zh_TW">渥太華</name>
<code>CYOW</code>
<radar>tyx</radar>
<coordinates>45-19N 075-40W</coordinates>
</location> Now this is what I ended up inserting a copy and modding it.
<location>
<name>Oshawa</name>
<name xml:lang="ar">Oshawa</name>
<name xml:lang="az">Oshawa</name>
<name xml:lang="bg">Oshawa</name>
<name xml:lang="bn">ওটাওয়া</name>
<name xml:lang="bn_IN">ওটাওয়া</name>
<name xml:lang="bs">Oshawa</name>
<name xml:lang="ca">Oshawa</name>
<name xml:lang="cs">Ottawa</name>
<name xml:lang="cy">Ottawa</name>
<name xml:lang="da">Ottawa</name>
<name xml:lang="de">Ottawa</name>
<name xml:lang="dz">ཨོ་ཊ་ཝ།</name>
<name xml:lang="el">Οττάβα</name>
<name xml:lang="en_CA">Oshawa</name>
<name xml:lang="en_GB">Oshawa</name>
<name xml:lang="es">Oshawa</name>
<name xml:lang="et">Ottawa</name>
<name xml:lang="eu">Oshawa</name>
<name xml:lang="fa">اوتاوا</name>
<name xml:lang="fi">Ottawa</name>
<name xml:lang="fr">Oshawa</name>
<name xml:lang="gl">Ottawa</name>
<name xml:lang="gu">ઓટાવા</name>
<name xml:lang="he">Ottawa</name>
<name xml:lang="hi">ओटावा</name>
<name xml:lang="hr">Ottawa</name>
<name xml:lang="hu">Ottawa</name>
<name xml:lang="id">Ottawa</name>
<name xml:lang="it">Ottawa</name>
<name xml:lang="ja">オタワ</name>
<name xml:lang="ka">ოტავა</name>
<name xml:lang="ko">오타와</name>
<name xml:lang="ky">Оттава</name>
<name xml:lang="lt">Otava</name>
<name xml:lang="lv">Ottawa</name>
<name xml:lang="mg">Ottawa</name>
<name xml:lang="mk">Ottawa</name>
<name xml:lang="ml">ഓട്ടാവാ</name>
<name xml:lang="mn">Ottawa</name>
<name xml:lang="mr">ओटावा</name>
<name xml:lang="nb">Ottawa</name>
<name xml:lang="ne">ओट्टावा</name>
<name xml:lang="nl">Ottawa</name>
<name xml:lang="nn">Ottawa</name>
<name xml:lang="or">ଓଟାଓ୍ବା</name>
<name xml:lang="pa">ਉਟਾਵਾ</name>
<name xml:lang="pl">Ottawa</name>
<name xml:lang="pt">Ottawa</name>
<name xml:lang="pt_BR">Ottawa</name>
<name xml:lang="ro">Ottawa</name>
<name xml:lang="ru">Оттава</name>
<name xml:lang="sl">Ottawa</name>
<name xml:lang="sq">Ottawa</name> <name xml:lang="en_CA">Oshawa</name>
<name xml:lang="en_GB">Oshawa</name>
<name xml:lang="sr">Отава</name>
<name xml:lang="sr@Latn">Otava</name>
<name xml:lang="sv">Ottawa</name>
<name xml:lang="ta">ஒட்டாவா</name>
<name xml:lang="te">ఓటావా</name>
<name xml:lang="th">ออตตาวา</name>
<name xml:lang="tr">Ottawa</name>
<name xml:lang="uk">Оттава</name>
<name xml:lang="vi">Ottawa</name>
<name xml:lang="zh_CN">渥太华</name>
<name xml:lang="zh_HK">渥太華</name>
<name xml:lang="zh_TW">渥太華</name>
<code>CYKZ</code>
<radar>tyx</radar>
<coordinates>45-19N 075-40W</coordinates>
</location>
<location>
K now there are a few tweeks here one of which is the city name
<name>Oshawa</name>
Also to make it so you can choose your new town entry you must modify the name for the language you are using.
I need someone to give the US language abbreviation as I live in Canada.
<name xml:lang="en_CA">Oshawa</name>
<name xml:lang="en_GB">Oshawa</name>
Now this is the part to get your local weather
<code>CYKZ</code>
This is the TAF code you need to look up on the net which may be difficult. You could also possibly phone your local airport for the info you need.
Warning Back up your Locations.xml before tweeking it may get Borked
Happy Hacking!