Mokometeo
From Openmoko
(→Sources: How can I commit my changes ?) |
|||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | = Mokometeo 0. | + | = Mokometeo 0.6 = |
− | [[Image:Capture-MokoMeteo.png]] | + | [[Image:Capture-MokoMeteo.png|frame|left|V0.2 screenshot]] |
+ | [[Image:Mokometeo_V0.6.png|frame|right|V0.6 screenshot]] | ||
+ | <br style="clear: both" /> | ||
== 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''' 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 http://www.opkg.org/packages/mokometeo_0.6_arm.ipk |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Also need dependancies (on SHR testing) : | Also need dependancies (on SHR testing) : | ||
Line 22: | Line 20: | ||
== Using Mokometeo == | == Using Mokometeo == | ||
+ | |||
+ | * For version 0.5 and higher, 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. The middle area (containing the forecast information) is now scrollable using the standard elementary finger scrolling action. | ||
* 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 43: | Line 43: | ||
== Configuring Mokometeo == | == Configuring Mokometeo == | ||
+ | |||
+ | === Version 0.5 and higher === | ||
+ | |||
+ | 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 (:) separated 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 | ||
+ | |||
+ | (or similar) to make sure it returns 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 51: | Line 70: | ||
Paris,http://fr.weather.yahoo.com/FRXX/FRXX0076/index_c.html | Paris,http://fr.weather.yahoo.com/FRXX/FRXX0076/index_c.html | ||
− | + | == Changelog == | |
− | + | === 2010-01-12 - v0.6 === | |
− | + | ||
− | == | + | * Added ability to add & remove locations using the GUI. |
+ | * Fixed problem where a space in the location designation caused the script to abort. | ||
+ | |||
+ | === 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 70: | Line 98: | ||
== 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/ | + | * <s>Use the GUI to add/remove locations</s> |
− | * 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 == | + | == Sources and contribution == |
You can access the sources and participate by commiting patches via the google code mercurial : | You can access the sources and participate by commiting patches via the google code mercurial : | ||
http://code.google.com/p/mokometeo/source/checkout | http://code.google.com/p/mokometeo/source/checkout | ||
Line 83: | Line 112: | ||
* You can use this password hN8CP6BV5mT7 | * You can use this password hN8CP6BV5mT7 | ||
− | [[Category:Utility]] | + | [[Category:Utility Applications]] |
− | [[Category: | + | [[Category:ApplicationsElementary]] |
Latest revision as of 23:24, 15 February 2010
Contents |
[edit] Mokometeo 0.6
[edit] Presentation
Mokometeo is a small python/elementary application fetching the weather forecast from WeatherUnderground weather pages
[edit] Installation
[edit] Dependencies
You need python-elementary and python-netclient to make it work.
[edit] OM and SHR
So to install it, you can do :
opkg install python-elementary python-netclient http://www.opkg.org/packages/mokometeo_0.6_arm.ipk
Also need dependancies (on SHR testing) :
opkg install python-netclient
[edit] Using Mokometeo
- For version 0.5 and higher, 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. The middle area (containing the forecast information) is now scrollable using the standard elementary finger scrolling action.
- 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 !
[edit] Configuring Mokometeo
[edit] Version 0.5 and higher
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 (:) separated 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
(or similar) to make sure it returns the location you're expecting.
The units line can also be changed to fahrenheit if desired.
[edit] 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
[edit] Changelog
[edit] 2010-01-12 - v0.6
- Added ability to add & remove locations using the GUI.
- Fixed problem where a space in the location designation caused the script to abort.
[edit] 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
[edit] 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
[edit] 2009-03-12 - v0.1
initial version
[edit] 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
[edit] 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