<snip>
On 16-12-09 09:47 PM, Gene Heskett wrote:
I made a workaround for this problem when gkrellm weather plugin stopped working. It is only a Perl script (native to the plugin) to modify. If you are interested I can send it with instructions to this list.
Cheers.
Please, send away! And thank you, as a perl geek I am not. I speak just enough C or assembly(on a 6x09 platform), to be dangerous.
Here is the Perl script in attachment :-) The problem is that the URL to fetch the weather data changed and the data format too...
The script name is: GrabWeather To install it, replace the existing one in /usr/share/gkrellm/: sudo cp GrabWeather /usr/share/gkrellm/ make sure it is executable: sudo chmod 755 /usr/share/gkrellm/GrabWeather
Then restart gkrellm. That's it!
I didn't kill the old one, but renamed it, And made all the rights & owners match the old one. Stopped gkrellm & restarted it several times but no difference. The url address in the old one had been patched once, and that is still that address in the "get your station ID at" box.
Running as root ./GRabWeather KCKB returns nothing, and as me: ./GrabWeather KCKB Cannot specify both -k and -O if multiple URLs are given, or in combination with -p or -r. See the manual for details.
Usage: wget [OPTION]... [URL]...
Manual? I doubt if the old one applies to this code.
Call me puzzled.
Sorry it did not worked the first time, BUT...
Could you try the new script in attachment?
Execute it at the command line with your city code as an argument. ex: ./GrabWeather KCKB
If the script worked properly, there should be 2 files in ~/.wmWeatherReports/ directory: KCKB.dat KCKB.txt Their timestamp must reflect they were just created.
When I execute it, ls -l ~/.wmWeatherReports/ gives me: -rw-rw-r-- 1 pascal pascal 98 Dec 10 07:10 KCKB.dat -rw-rw-r-- 1 pascal pascal 601 Dec 10 07:10 KCKB.TXT
If so the script worked as expected and you can install it safely in /usr/share/gkrellm/
Hope it will be OK this time :-)
midi-pascal
Am Samstag 10 Dezember 2016 schrieb midi-pascal:
<snip>
Could you try the new script in attachment?
Execute it at the command line with your city code as an argument. ex: ./GrabWeather KCKB
If the script worked properly, there should be 2 files in ~/.wmWeatherReports/ directory: KCKB.dat KCKB.txt Their timestamp must reflect they were just created.
When I execute it, ls -l ~/.wmWeatherReports/ gives me: -rw-rw-r-- 1 pascal pascal 98 Dec 10 07:10 KCKB.dat -rw-rw-r-- 1 pascal pascal 601 Dec 10 07:10 KCKB.TXT
If so the script worked as expected and you can install it safely in /usr/share/gkrellm/
Hope it will be OK this time :-)
midi-pascal
Works like you sayed here (Devuan/jessie, TDE R14.0.4). Thank you for sharing your script.
Stefan
On Saturday 10 December 2016 07:12:58 midi-pascal wrote:
ls -l ~/.wmWeatherReports/
I got them in my ~/.wmWeatherReports directory, but neglected to see if gkrellm had updated. So chowned it to root:root and overwrote the one in /usr/share/gkrellm, and when I did look as soon as I'd hit F10 on the root session of mc, gkrellm had updated.
I had set gkrellms weather page for a 1 minute refresh, but they don't refresh that often, but before I slowed it down to 15 minutes, those files in my home directory were getting their time stamp kept up to the minute. Hovering over the weather line of gkrellm shows they had last updated at 10:00 AM, and its 10:52 here now. I just set it back to 10 minutes, and the files in my home directory were updated, but not the data. I'll get a better idea of when they do a new snapshot that way.
I do believe I am back in business! Thank you very much!, whoever you really are.
Cheers, Gene Heskett