You are not logged in.
Migrating again from heavy GNOME3 to the Openbox desktop, I was looking for a lightweight tray application with current weather report. Search through AUR gives me nothing and I rapidly wrote a small script on Python2 and GTK which displays the current weather condition. It retrieves data from Yahoo!Weather and uses gtk-stock icons for display.
Here it is. and AUR
UPD 20120606: left click on icon opens the weather site (http://weather.yahoo.com/ will be opened in the default browser). This small improvement uses standard webbrowser python module (+4 lines to the applet code).
UPD 20111002: '-a/--advanced' key for advanced tooltip (like on screenshot above). 'Quit' menu on right click.
Thank you for every comment and remark!
Last edited by decay_of_mind (2012-06-06 13:39:42)
Offline
Moving to Community Contributions.
To know or not to know ...
... the questions remain forever.
Offline
Maybe I got my WOEID wrong, but all I'm getting is a blank tray icon, and a whole lot of
Traceback (most recent call last):
File "./weatherboy", line 173, in on_tooltip_verbose
now_image.set_from_icon_name(weather['current_icon'],48)
TypeError: Gtk.Image.set_from_icon_name() argument 1 must be string, not None
whenever I hover over it.
It's certainly a great idea though.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Maybe I got my WOEID wrong, but all I'm getting is a blank tray icon, and a whole lot of
Traceback (most recent call last): File "./weatherboy", line 173, in on_tooltip_verbose now_image.set_from_icon_name(weather['current_icon'],48) TypeError: Gtk.Image.set_from_icon_name() argument 1 must be string, not None
whenever I hover over it.
It's certainly a great idea though.
Please, post your params of weatherboy.
Offline
Of course.
./weatherboy -l 41415 -u c -v
WOEID extracted from this, for York, England: http://where.yahooapis.com/geocode?q=York+England
Last edited by WorMzy (2011-09-30 20:53:28)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Of course.
./weatherboy -l 41415 -u c -v
WOEID extracted from this, for York, England: http://where.yahooapis.com/geocode?q=York+England
Yes, you unfortunately have 'Unknown' weather condition now in York, which has no icon in weatherboy. I'll fix it soon. Thx.
UPD: Fix it but till you have 'Unknown' condition you'll get an ugly unknown icon. I recommend you to change your location
Last edited by decay_of_mind (2011-09-30 21:32:46)
Offline
Oh, is that all? Glad I could help.
Hopefully that's not an indication that Yahoo Weather doesn't cover my area.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I have modified my location to something more specific, which does have weather, so hopefully that "unknown" icon won't get seen too often.
I also voted your package up on the AUR, works great now.
I have a couple of suggestions though. "Verbose" seems to be required for a detailed tooltip? I can see the logic behind that, but I'd expect verbose to mean you get more output on stdout. You might want to either change that, or make it clear what -v does on -h's output.
Also, a right-click context menu with an "exit" option would be great. Currently, the only way to kill weatherboy is to ascertain the process' PID (using ps + grep), then issue a sigterm to the process (or use a process manager like htop to do something similar).
And, a config file would be great, so you can just run "weatherboy" and have it use preset values.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I have modified my location to something more specific, which does have weather, so hopefully that "unknown" icon won't get seen too often.
I also voted your package up on the AUR, works great now.
I have a couple of suggestions though. "Verbose" seems to be required for a detailed tooltip? I can see the logic behind that, but I'd expect verbose to mean you get more output on stdout. You might want to either change that, or make it clear what -v does on -h's output.
Also, a right-click context menu with an "exit" option would be great. Currently, the only way to kill weatherboy is to ascertain the process' PID (using ps + grep), then issue a sigterm to the process (or use a process manager like htop to do something similar).
And, a config file would be great, so you can just run "weatherboy" and have it use preset values.
I've noticed all your ideas, but what about configuration file. I'll not do that because main idea of weatherboy is to be run on startup and there are only three options (woeid, timeout and units). It's too little for config file.
Offline
Yeah, I guess you're right about that.
EDIT: Didn't realise you already added the changes. Great work.
Unfortunately though, it seems to default to Moscow, Russia, and any arguments you pass to the script are silently ignored.
Last edited by WorMzy (2011-10-01 13:48:57)
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Yeah, I guess you're right about that.
EDIT: Didn't realise you already added the changes. Great work.
Unfortunately though, it seems to default to Moscow, Russia, and any arguments you pass to the script are silently ignored.
You can reinstall it from AUR. Sorry I was in a hurry doing modifications.
Offline
Yeah, I figured you'd have just forgotten to remove the developmental parameters. Works again now.
Just FYI, you should bump up the pkgrel number every time you edit the PKGBUILD for the same version. Or at least before you resubmit it to the AUR. Otherwise pacman -U/AUR helpers think that the installed package is already up-to-date.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
UPD 20111012: Right from Sheremetyevo airport
New option "Refresh" in right-click menu for manual update weather data. It will useful in case of lost internet connection or boot up with no internet.
Offline
UPD 20111028: Arrow signs in wind direction info added.
Offline
Just found weatherboy in the AUR. It works great for Port Isaac, UK.
Thankyou very much!
This Is My Truth, Tell Me Yours
Offline
Can someone help me to fix an error with urlopen() call after internet connection establish when weatherboy was started without an internet connection?
Offline
Small hint! UPD!!! (fixed after wake up after suspend)
If you want weatherboy to be run only after successful Internet connection, for Wicd just make a file called weatherboy.sh (for example) looking like this:
#!/bin/bash
script="$(basename "$0")"
script_name="${script/.sh/}"
echo "Running ${script}" >"/var/log/wicd/${script_name}.log"
exec 2>>"/var/log/wicd/${script_name}.log"
exec 1>&2
export DISPLAY=:0.0
if pgrep weatherboy > /dev/null 2>&1 ; then
echo "Already started. do nothing"
exit 0
else
echo "Starting program"
sleep 3 &&
sudo -u zengeist weatherboy -l 796597 -u c -d 10 -a &
fi
... and put this script into /etc/wicd/scripts/postconnect/ directory
Last edited by decay_of_mind (2012-05-28 22:40:39)
Offline
Is is minutes or seconds meant with -d [delta] option?
Offline
Is is minutes or seconds meant with -d [delta] option?
Minutes
Offline
UPD 20120606: left click on icon opens the weather site (http://weather.yahoo.com/ will be opened in the default browser). This small improvement uses standard webbrowser python module (+4 lines to the applet code).
Offline
cool, I already thought there could be any function on icon leftclick.
I translated the version before into german via a workaround / patch. I don't know if it's complete, because the conditions list in yahoo weather api doc is partly not valid anymore.
Are you interested in extending the weatherboy for supporting other languages e.g. by loading a certain language file?
Offline
Of course, I can extend this app to !morethanonefilebigapp!, but I don't think I should do this.
Offline
page is 403. Please fix
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Migrating again from heavy GNOME3 to the Openbox desktop, I was looking for a lightweight tray application with current weather report.
You are describing my situation. I was looking for something as weatherboy, thanks a lot.
I really don't care, but the left click doesn't do anaything for me. I'm using lxde and chromium.
I have a suggestion. Can weatherboy icon display the temperature just like weather-indicator (cloudy)? I think it' a nice feature
https://wiki.ubuntu.com/WeatherIndicato … y_beta.png
Last edited by David López (2012-09-20 18:31:44)
Offline
Hi
Thanks for cool apps, but can you add support - when programm start and internet down and then up, weather cann't update and manual too.
Last edited by HarD (2013-03-31 20:43:40)
Offline