
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
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.
10 years ago
- 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.
10 years ago
- 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.
xdunlapx
8 years ago
Report
Farsaj
9 years ago
Report
denisp
10 years ago
Max:
Min:
any idea about what's happening ?
Thanks
Report
merciful
10 years ago
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
Report
denisp
10 years ago
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
Report
merciful
10 years ago
Report
denisp
10 years ago
- 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,
Report
merciful
10 years ago
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
Report
denisp
10 years ago
I've got two squares instead of ° for temperatures. Is UTF8 supported ?
Thanks
Report
denisp
10 years ago
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
Report
merciful
10 years ago
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
Report
MoonBlossom
10 years ago
Report
nottinhill
10 years ago
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!
Report
nottinhill
10 years ago
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.
Report
kuchumovn
11 years ago
so how can i install it?
(I'm using Kubuntu 9.04)
Report
Grindcore
10 years ago
superkaramba
plasma-scriptengine-superkaramba
Afterwards you should be able to install the file (choose Superkaramba in the dialogue).
Report
merciful
11 years ago
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
Report
astreaapn
11 years ago
# 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";
Report
merciful
11 years ago
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
Report
merciful
11 years ago
Eabe
Report
merciful
11 years ago
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
Report
astreaapn
11 years ago
The problem is fix with the change of symbol posted before.
Report
astreaapn
11 years ago
Report
merciful
11 years ago
Report