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
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.
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? ) ,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…)
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 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…)
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
Thx for answeres & Greetings