Active Topics

 


Reply
Thread Tools
Posts: 226 | Thanked: 270 times | Joined on Apr 2012 @ Bosnia and Herzegovina
#41
I wonder why my post is deleted!?

..................................
Again, it is possible to make it look like yahoo weather widget used to. Not using yahoo weather but using imagemagick. Exams are coming soon so I really don't have time for that right now, but if you don't want to wait, you can use THIS script to make it...it shouldn't be so hard to do.
 
Posts: 155 | Thanked: 82 times | Joined on Mar 2012 @ Australia
#42
Originally Posted by dzano View Post
I wonder why my post is deleted!?

..................................
Again, it is possible to make it look like yahoo weather widget used to. Not using yahoo weather but using imagemagick. Exams are coming soon so I really don't have time for that right now, but if you don't want to wait, you can use THIS script to make it...it shouldn't be so hard to do.
But isn't that to make the lockscreen?
__________________
1. N900 + CSSU Thumb
2. N900 + KP51, CSSU Thumb, Meecolay
 
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#43
dzano,

Great work on this. There are a few issues with the script though:

First, it assumes that all xml files from different regions are the same length and have the same info on exactly the same lines. That's not at all true.

It also assumes that the file names stay the same. They don't. They change randomly, from months to days apart.

Also, the icons are huge, and many are identical.

In that regard... I rewrote the script. It should work for most people, out of the box, few settings changes. All you have to do is choose what area you want to default to, since the widget allows you to have multiple "home" weathers.

This version only relies on 13 of the icon files (non redundant), and does conversions for °C to °F, and Kph to Mph, which is easy to change back if you prefer. (The xml is always in metric values apparently.)

Anyway... check it out, and let me know what you think. Feel free to pull it in, make changes, or whatever.

Overall I really like this compared to the other scripts I worked with/wrote to do this, since it's getting the weather from a reliable and rather un-changing source (the XML). The previous one relied on Yahoo weather, but Yahoo changes it's page formats every few months, and it's radically different by region.

Ideally, one would run this in pearl, and use a proper XML parser to do this work. But for now, shell works. I commented parts a bit as well, so it should be more readable.

Anyway, enjoy!
Attached Files
File Type: gz weather.sh.gz (1.4 KB, 93 views)
__________________
Maemo Council Member: May 2012 - November 2012
Hildon Foundation founding member.
Hildon Foundation Board of Directors: March 2013 - Jan 15, 2014
 

The Following 2 Users Say Thank You to woody14619 For This Useful Post:
Posts: 226 | Thanked: 270 times | Joined on Apr 2012 @ Bosnia and Herzegovina
#44
I know that all .xml files are not same.
File names are always same, they don't change..but they are different by region/city.

And as I already said, I hope someone is willing to make it better...this is my first script and I hardly managed to make it work

Great work..thank you!

Originally Posted by n900d-i-y View Post
But isn't that to make the lockscreen?
It is but you could use that "imagemagick" lines at bottom of the script.

Last edited by dzano; 2013-02-06 at 22:35.
 

The Following User Says Thank You to dzano For This Useful Post:
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#45
Originally Posted by dzano View Post
I know that all .xml files are not same.
File names are always same, they don't change..but they are different by region/city.
They remain that way for a while sometimes, but found something like 200 files in my folder, many with similar, but not identical names. (Some dated back almost 3 years.) Using find to refine that list to things touched in the past day limits that nicely.

Originally Posted by dzano View Post
And as I already said, I hope someone is willing to make it better...this is my first script and I hardly managed to make it work
As I said, feel free to update/fix this to work in your area as well. I would assume the tag names stay the same, but they may not. Depends on if the XML tags are translated too, which I doubt, but is possible.

It should be simple to add back in the things you had before that I took out (sunrise/set, etc) if you desire that. When I get more time (rare) I may work on it more to add some other things, unless you get to it first.
__________________
Maemo Council Member: May 2012 - November 2012
Hildon Foundation founding member.
Hildon Foundation Board of Directors: March 2013 - Jan 15, 2014
 

The Following User Says Thank You to woody14619 For This Useful Post:
Posts: 226 | Thanked: 270 times | Joined on Apr 2012 @ Bosnia and Herzegovina
#46
Lets hope names won't change very often. I'm working on these scripts (that use .xml file) for 3 months now and it didn't change..al least for Sarajevo.

Anyway, it's not big deal to update script with new .xml name...but I'll try to figure out something.

Thanks for your help
 
Posts: 155 | Thanked: 82 times | Joined on Mar 2012 @ Australia
#47
@ woody14619

I am using HTC Weather widget 3, but I don't know how to add H temp and L temp like the original yahoo widget, would you know what to add in the .txt file?
__________________
1. N900 + CSSU Thumb
2. N900 + KP51, CSSU Thumb, Meecolay
 
Posts: 226 | Thanked: 270 times | Joined on Apr 2012 @ Bosnia and Herzegovina
#48
Originally Posted by n900d-i-y View Post
@ woody14619

I am using HTC Weather widget 3, but I don't know how to add H temp and L temp like the original yahoo widget, would you know what to add in the .txt file?


As woody14619 suggested, I made some changes. Now it can convert C to F, and automaticaly find .xml file if name is changed.

1. It works with OMWeather, so you need to install and configure it.

2. Install imagemagick from extras.
Code:
root
apt-get install imagemagick
3. Extract THIS in /home/user/MyDocs/.Weather/

4. open Xterminal:
Code:
root
chmod 777 /home/user/MyDocs/.Weather/*
5. Extract THIS in /home/user/imagemagick/fonts/

6. Import THIS to QBWidget and edit refresh interval.

7. Edit /home/user/MyDocs/.Weather/weather.sh
(change name of XXXXXXXX.xml file)

Last edited by dzano; 2013-02-09 at 13:46.
 

The Following 2 Users Say Thank You to dzano For This Useful Post:
woody14619's Avatar
Posts: 1,455 | Thanked: 3,309 times | Joined on Dec 2009 @ Rochester, NY
#49
Nice update. Just FYI: The opis line you use probably won't always work. You need to make it like the press1 & press2 entries, looking for the opis tag first, then the <t> tag after it. Other wise you'll wind up with what ever <t> tag comes first in the xml, which may or may not be the opis value.

Very nice overall. It's simple little things like this that add that extra layer of beauty and make the N900 shine all the more.
__________________
Maemo Council Member: May 2012 - November 2012
Hildon Foundation founding member.
Hildon Foundation Board of Directors: March 2013 - Jan 15, 2014
 
Posts: 226 | Thanked: 270 times | Joined on Apr 2012 @ Bosnia and Herzegovina
#50
 

The Following User Says Thank You to dzano For This Useful Post:
Reply

Tags
nokia n900, weather


 
Forum Jump


All times are GMT. The time now is 03:55.