Yahoo Weather theme

Karamba & Superkaramba

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

2
Become a Fan
4.7

Description:
Yahooweather is no longer a modification of "Another Weather Theme 1.0". Only the php code to get the weatherdata is based on this theme. All other stuff are rewritten. This because I wanted the following issues:
- the php code was called for every bit of data. So older versions called the php code 20 times for every update. This is reduced now to 1 call per update.
- The theme had problems finding itself so people had to manually correct the paths in the source.

What is new:
- added a shell script that deals with the paths and calls the php code.
- added python script to make better use of karamba. (I had to learn python for this! e.g. this is actually my first ever written python script)
- cleaned the theme file.
- The theme will create a folder in the system temp (/tmp) called YahooWeather where it will store a data file, the downloaded html and log file if needed.
- At this moment the yahoo url is defined in the shell script. This will change in the future.
/* ------------ */
This is a modification of the "Another Weather Theme 1.0" that can be found here: http://www.kde-look.org/content/show.php/Another+Weather+theme?content=101180

Added: - temperature display
- Five day forecast
- Location

Change the url in the "weather.php" file to match your location.
Last changelog:

- Problems with the paths are now solved I hope. (06-11-2010)
- Using less resources from the system.

- Yahoo changed its code again, so small update. (18-07-2010)
- Today (14-12-2009) Yahoo changed the code on it's weather page again. Modified the script so it works again.
- Today (12-11-2009) Yahoo changed the code on it's weather page. I had to modify the script to make it work again.
- Repacked the archive so it can be installed as archive by karamba.
- Changed paths to "themes" folder.


Ratings & Comments

24 Comments

xdunlapx

Download link is broken.

Farsaj

Cannot download

denisp

All I've got on my desktop is : Max: Min: any idea about what's happening ? Thanks

MoonBlossom

Try installing php5-cli or php-cli

merciful

Try to execute the file "weather.php". It should produce a output similar to this: eabe@eabeacer:~/.kde/share/apps/superkaramba/YahooWeather$ php ./weather.php weatherpics/20n.png 8 C 12 C 6 C Leeuwarden Tonight: 6 / 12 weatherpics/29s.png Tomorrow: 7 / 11 weatherpics/9s.png Mon: 7 / 12 weatherpics/30s.png Tue: 8 / 12 weatherpics/11s.png Wed: 9 / 12 weatherpics/24s.png If it does not, check your php installation. If it does, check the paths and correct them if needed. Php should be at php5. I'm using this one: PHP 5.2.13 (cli) (built: Mar 28 2010 20:43:45) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies This comes with Slackware 13.1

denisp

Hi Merciful, thanks for your answer. I installed php5-cli. checked php which is a symlink to /usr/bin/php5. php ./weather.php gives me : weatherpics/28d.png 11?C 15?C 8?C Redon Today: 8 / 15 weatherpics/11s.png Tomorrow: 10 / 16 weatherpics/30s.png Tue: 11 / 17 weatherpics/28s.png Wed: 11 / 17 weatherpics/30s.png Thu: 10 / 16 weatherpics/28s.png but still no display except : max: min: Regards, PS : this is on a debian squeeze system

merciful

In the files YahooWeather.pl & YahooWeather.theme check if the paths correspod to your actual path. Correct the paths in these files if needed!

denisp

I checked the pathes : indeed there were two problems : - I'm using trinity that is continuing kde 3 branch, so the config directory is ~/.trinity, not ~/.kde - the directory where the theme files are located is .../superkaramba/themes/YahooWeather-1/YahooWeather-1.3 and not .../superkaramba/themes/YahooWeather-1 So I did the changes, but it still does not work. But I wonder if there is not another problem : the files are called pogoda.pl and pogoda.theme, not YahooWeather.pl and YahooWeather.theme as you said. Regards,

merciful

in the .pl and .theme file change the paths to ~/.trinity/share/apps/superkaramba/themes/YahooWeather-1/YahooWeather-1.3/ or if this is not the correct path, to the real path. Filenames doesn't matter really. I'm using a modified version that will be available soon. Eabe

merciful

You can also try to change paths to the absolute paths e.g. /home/<username>/.kde/share/apps/superkaramba/YahooWeather/ If nothing is displayed and you get info from weather.php, the theme can't find the .pl file or the .pl file can't find the weather.php file. Eabe

denisp

OK, now it works, but I had to do 3 things for that : 1) like you said, replace ~ by /home/denis in pogoda.theme 2) add "#!/bin/sh" at top of pogoda.pl (It looks strange since pl should have meant that it was a perl file, but it works) 3) chmod +x pogoda.pl Thanks for your help

denisp

Sorry, I forgot one last problem. I've got two squares instead of ° for temperatures. Is UTF8 supported ? Thanks

nottinhill

Above goes if you install manually. Installing from Karamba Menue works without alteration of files. I fixed the issue with installing PHP-CLI. For SuSE it might be worth noting that this equals to PHP5. The Yahoo PNG are great, Thank you for the app!

nottinhill

As for weather.php and pogoda.pl it has already been noted that they are messed up. A quick looks into pogoda.theme shows that it is also messed up thoroughly. All hardlinks go to wrong YahooWeather-1 Directory and not updated -1.2 directory. Also .kde might not work for .kde4 folders. I fixed the 3 messed up files (that is 100% of the program!), but it still is not working. Anymore ideas? I use KDE4.3.5. I see only min/max font.

kuchumovn

hi, so how can i install it? (I'm using Kubuntu 9.04)

merciful

Hi, You should be able to install it from within Karamba. But you can also extract it and place it in this path: Quote:

~/.kde/share/apps/superkaramba/themes/YahooWeather-1/
Eabe

Grindcore

Check that you have the following packages installed: superkaramba plasma-scriptengine-superkaramba Afterwards you should be able to install the file (choose Superkaramba in the dialogue).

astreaapn

replace this # Echo stuff to calling app echo $image."\n"; echo $temp."�C\n"; echo $max."�C\n"; echo $min."�C\n"; to # Echo stuff to calling app echo $image."\n"; echo $temp."°C\n"; echo $max."°C\n"; echo $min."°C\n"; echo $place."\n";

merciful

Hi, I only see this: # Echo stuff to calling app echo $image."\n"; echo $temp."°C\n"; echo $max."°C\n"; echo $min."°C\n"; echo $place."\n"; The question mark symbols from your example, I don't get here. Probably something with font or code page I guess. Eabe

astreaapn

send me a screenshot of that.

merciful

Just send you a screenshot :-)

merciful

Even on the console (Slackware / Nano) it looks all fine. What app are you using? Eabe

merciful

Only if I open the file with KWord, I get the same result as you. The file is a plain text file. The best way to edit this file is using a text editor like KWrite, Kate, Nano or Vi. Eabe

astreaapn

Thank you for answering. The problem is fix with the change of symbol posted before.

Pling
0 Affiliates
Details
license
version 1.9
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

Other Karamba & Superkaramba:

Evolution Task Theme (for Karamba)
L0rclA5CII
last update date: 22 years ago

Score 5.0

Karambaqua
manor
last update date: 22 years ago

Score 5.0

Karamba Print Queue Monitor
Praxxus
last update date: 22 years ago

Score 5.0

The DarkGirl wallpaper and Karamba theme
xray
last update date: 22 years ago

Score 5.0

TecnoBar for Karamba
ZIOlele
last update date: 22 years ago

Score 5.0

Karamba Ink Level Monitor
Praxxus
last update date: 22 years ago

Score 5.0