Weather popup

Esteemed fellows,

I know this is nothing new. I know there are programs out there, like Gdesklets, that can do the same thing in a better and easier way (and eating alot of memory too…). But I decided to reinvent the wheel, once again, and made a small script to remember me that there is life beyond the computers :slight_smile:

To run this script you need Perl, Weather::Cached module (from CPAN) and an account (free) in weather.com (they supply the icons too). Since I don’t know if I can redistribute their icons, I wont do it.

The popup looks like this:

I start it from a button as you can see here (the button is the moon, between the volume button and the mail notifier.

Since this is my first FvwmScript, I would appreciate some guidance on better ways to do some things, as 670 lines for a small script seems too much.

Suggestions are more than welcome.

######## LINKS #########
Perl script
Weather_popup
Weather_dock

[color=red]Edited by theBlackDragon:
–> Moved from Screenshots & configs[/color]

This looks pretty cool. I will have to try it.

Thanks Miguel,for your responce in my message.

For the rest that they are interested,you have to sign up in this page,and you will receive a zip file with the needed icons and the license key.

The interesting part about it,as Miguel show me (dare to post that specific screenshot? :smiley: ) ,is that you can display multiple locations,at the same time.

As suggested by agx here is a shot with multiple locations (altought you can have just one at a time, this is: open with one location, change the variables in the Perl script and reopen another window…)

simplicidade.com/permanente/ … ltiple.png

By the way, I changed the Perl script to make it easier to modify (not that it was difficult, but you never know).

NOTE: To get a license and a Partner ID from weather.com/services/xmloap.html

i like the way the weather is presented. much better than most of those weather scripts that show the weather in a menu.

I think I’ll give it a try.

how is it being updated? just with some timer or something, or with an action of the user?

I set a timeout of 250 seconds

timeout    => 250,      # Time to update information

Let me try to explain.

The first time you run the script, the data gathered from weather.com is stored in cache => '/tmp', # Where to store the temporary files

Here (/tmp), or some other place where you want to store the temporary files, is created a xxxxx.dat file.

Everytime you run the script (everytime you open the window) the Perl module checks if has passed 250 seconds since the last time you run the script. If yes, gets new data from weather.com, if not, shows the same information stored in that temporary file.

So, you need to have an Internet connection available only when you want to see the information. It’s not a service running in the background.

I cant find the icons i need i need, for some reason i cant register on weather.com, can someone provide their icons ??

msantinho can you show your config file , how are you invonking your FvwmScript ?

I launch it from a button on my dock:

........ other buttons ............
*FvwmButtons: (1x1, Swallow "WeatherDock" \
     `FvwmScript /path/to/scripts/Weather_dock` \
     Frame 0
)
........ other buttons ............

Weather_dock

About the icons: I can’t share them. They’re not mine and I know nothing about their license.

Hope this helps.

EDIT
Now, while reading their (weather.com) Guide I found that running this script seems illegal, since I do not provide a hyperlink to weather.com:

So, my suggestion is: modify it to display their logo and link to their website or do not use this script at all.

here they are !!!
No problem about using them, i ended up discovering that i already had them :stuck_out_tongue:
I forgot that i already had wether in my menu

http://jyrik.deviantart.com

I its working like a charm, keep up the good work man !!!

Btw may i ask you wich FvwmScript and prog are you using for countig mails on your FvwmButtons ???
I cant find an interesting one and simple for doing the same , i use pop3 autentication so im kind a lost here …

for those in the US, why not use NOAA? there are posts on gentoo forums about doing it; they have plain text files that have weather forcasts; that is easy to grep/awk/piperead in, and you dont run into the legality (as it is governmental…)

killfire

OMG , am i going to be arrested just because i wanted to see the weather ???

Hi,
one question about the module from cpan, does anyone here know which module exactly it is? On cpan I found a lot of different weather-modules and do not know which is the right one :slight_smile:
Thx for answeres & Greetings

EDIT:

I`ve found it by myself, thx

Hello :slight_smile:

on ubuntu i have installed :
libxml-parser-perl libxmlsax-perl libxml-sax-expat-perl libxml-simple-perl

the screenshot is really great :
jyrik.deviantart.com/art/JK-G5-I … ot-9648762
did you realase a config for that one ?

Thank you, happy linux, happy fvwm !

This is Windows (with Samurize). Here are linux screenshots]http://browse.deviantart.com/customization/screenshots/#catpath=customization/screenshots/nix&order=24[/url]