Mokometeo
From Openmoko
Matzehuber (Talk | contribs) (→Mokometeo 0.1 / 0.2 and German 0.31) |
(→Mokometeo 0.1 / 0.2) |
||
Line 1: | Line 1: | ||
− | = Mokometeo 0. | + | = Mokometeo 0.5 = |
[[Image:Capture-MokoMeteo.png]] | [[Image:Capture-MokoMeteo.png]] | ||
+ | [[Image:Mokometeo_V0.5.png]] | ||
== Presentation == | == Presentation == | ||
− | '''Mokometeo''' is a small python/ | + | '''Mokometeo''' is a small python/elementary application fetching the weather forecast from WeatherUnderground weather pages |
== Installation == | == Installation == | ||
=== Dependencies === | === Dependencies === | ||
− | You need '''python- | + | You need '''python-elementary''', '''python-html''' and '''python-netclient''' to make it work. |
=== OM and SHR === | === OM and SHR === | ||
So to install it, you can do : | So to install it, you can do : | ||
− | opkg install python- | + | opkg install python-elementary python-netclient python-html http://www.opkg.org/packages/mokometeo_0.5_arm.ipk |
Also need dependancies (on SHR testing) : | Also need dependancies (on SHR testing) : | ||
Line 18: | Line 19: | ||
== Using Mokometeo == | == Using Mokometeo == | ||
+ | |||
+ | * For version 0.5, once the package (and dependencies) is installed, simply click on the desktop icon. A default configuration file <tt>~/.mokometeo.cfg</tt> will be created which can be edited to your liking. Previous and next locations are selected using the buttons at the bottom of the screen, and if a network connection is active the forecast can be updated using the Refresh button. The forecast for all locations is saved in the configuration file so that a network connection is not necessary for switching locations after starting mokometeo. | ||
* In the 0.2 version, there is a bug. To be able to use Mokometeo, please type theses commands before launching it: | * In the 0.2 version, there is a bug. To be able to use Mokometeo, please type theses commands before launching it: | ||
Line 39: | Line 42: | ||
== Configuring Mokometeo == | == Configuring Mokometeo == | ||
+ | |||
+ | === Version 0.5 === | ||
+ | |||
+ | The configuration file <tt>~/.mokometeo.cfg</tt> has a section named <tt>[Main]</tt> which looks like: | ||
+ | |||
+ | [Main] | ||
+ | units = celsius | ||
+ | lastview = 0 | ||
+ | locations = Melbourne,AU:Perth,AU:Paris,FR | ||
+ | |||
+ | The locations line can be edited and colon (:) locations of your choice added. I've found that <tt><city>,<country abbreviation></tt> works well with the WeatherUnderground API. It's probably worth checking using this URL: | ||
+ | |||
+ | http://api.wunderground.com/auto/wui/geo/GeoLookupXML/index.xml?query=Melbourne,AU | ||
+ | |||
+ | to make sure it return the location you're expecting. | ||
+ | |||
+ | The units line can also be changed to <tt>fahrenheit</tt> if desired. | ||
+ | |||
+ | === Previous versions === | ||
* By default, 2 cities are configured. You can change the cities and add more in the file | * By default, 2 cities are configured. You can change the cities and add more in the file | ||
Line 48: | Line 70: | ||
== Changelog == | == Changelog == | ||
+ | |||
+ | === 2009-12-14 - v0.5 === | ||
+ | |||
+ | * Now uses the elementary GUI instead of Gtk+. | ||
+ | * Now uses the Weather Underground site instead of Yahoo weather (better API). | ||
+ | * Six days of forecast available. | ||
+ | * Now uses a single file (<tt>~/.mokometeo.cfg</tt>) for configuration and location history. The .mokometeo directory is no longer needed. | ||
+ | * Weather icons are not downloaded on the fly, they're part of the package. | ||
+ | * History is saved for all defined locations | ||
=== 2009-03-13 - v0.2 === | === 2009-03-13 - v0.2 === | ||
Line 61: | Line 92: | ||
== Future improvements / To do list == | == Future improvements / To do list == | ||
− | * debug the initial copy of /usr/share/mokometeo/question.png into /home/root/.mokometeo/img/ | + | * Use the GUI to add/remove locations |
− | * improve the way the connection to Yahoo is handled | + | * <s>debug the initial copy of /usr/share/mokometeo/question.png into /home/root/.mokometeo/img/</s> |
+ | * <s>improve the way the connection to Yahoo is handled</s> | ||
* test with different languages / locations | * test with different languages / locations | ||
− | * handle backup data for each city in the config file | + | * <s>handle backup data for each city in the config file</s> |
== Sources and contribution == | == Sources and contribution == |
Revision as of 05:23, 14 December 2009
Contents |
Mokometeo 0.5
Presentation
Mokometeo is a small python/elementary application fetching the weather forecast from WeatherUnderground weather pages
Installation
Dependencies
You need python-elementary, python-html and python-netclient to make it work.
OM and SHR
So to install it, you can do :
opkg install python-elementary python-netclient python-html http://www.opkg.org/packages/mokometeo_0.5_arm.ipk
Also need dependancies (on SHR testing) :
opkg install python-netclient
Using Mokometeo
- For version 0.5, once the package (and dependencies) is installed, simply click on the desktop icon. A default configuration file ~/.mokometeo.cfg will be created which can be edited to your liking. Previous and next locations are selected using the buttons at the bottom of the screen, and if a network connection is active the forecast can be updated using the Refresh button. The forecast for all locations is saved in the configuration file so that a network connection is not necessary for switching locations after starting mokometeo.
- In the 0.2 version, there is a bug. To be able to use Mokometeo, please type theses commands before launching it:
mkdir /home/root/.mokometeo mkdir /home/root/.mokometeo/img cp /usr/share/mokometeo/question.png /home/root/.mokometeo/img/
- for the german 0.3, you don't need this
- You will see a window appearing, with a 4 days forecast : Today, tomorrow (J+1), the day after (J+2) , etc.
- You can use the Next and Previous buttons to change the displayed city.
- If you have no internet connection, you will have to wait a little bit, and then the window will show "question marks" and "-" as min and max temperatures
- Next time you starup Mokometeo, the last fetched data will be displayed.
Enjoy !
Configuring Mokometeo
Version 0.5
The configuration file ~/.mokometeo.cfg has a section named [Main] which looks like:
[Main] units = celsius lastview = 0 locations = Melbourne,AU:Perth,AU:Paris,FR
The locations line can be edited and colon (:) locations of your choice added. I've found that <city>,<country abbreviation> works well with the WeatherUnderground API. It's probably worth checking using this URL:
http://api.wunderground.com/auto/wui/geo/GeoLookupXML/index.xml?query=Melbourne,AU
to make sure it return the location you're expecting.
The units line can also be changed to fahrenheit if desired.
Previous versions
- By default, 2 cities are configured. You can change the cities and add more in the file
~/.mokometeo/mokometeo.conf
This file must contains at minimum 2 lines. The first line is
city,url
The second and next lines is the name of the city, and the url (tested with french yahoo weather urls), for example:
Paris,http://fr.weather.yahoo.com/FRXX/FRXX0076/index_c.html
Changelog
2009-12-14 - v0.5
- Now uses the elementary GUI instead of Gtk+.
- Now uses the Weather Underground site instead of Yahoo weather (better API).
- Six days of forecast available.
- Now uses a single file (~/.mokometeo.cfg) for configuration and location history. The .mokometeo directory is no longer needed.
- Weather icons are not downloaded on the fly, they're part of the package.
- History is saved for all defined locations
2009-03-13 - v0.2
- added some "print" in the code
- debug the .mokometeo folder ; put the config folder in /home/root/.mokometeo/ instead of /.mokometeo/
- test if the connection to internet is ok. If not, display question marks
- backup the data each time data is downloaded and displayed. This data is used on the next Mokometeo startup
- added the date and time when the data has been downloaded
2009-03-12 - v0.1
initial version
Future improvements / To do list
- Use the GUI to add/remove locations
-
debug the initial copy of /usr/share/mokometeo/question.png into /home/root/.mokometeo/img/ -
improve the way the connection to Yahoo is handled - test with different languages / locations
-
handle backup data for each city in the config file
Sources and contribution
You can access the sources and participate by commiting patches via the google code mercurial : http://code.google.com/p/mokometeo/source/checkout To be able to commit:
- you need a gmail email adress
- I must add you as a user, so please contact me (or edit the discussion tab of this page)
- You can use this password hN8CP6BV5mT7