This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

murf's weather script v2112 =p

Support & discussion of released scripts, and announcements of new releases.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

murf's weather script v2112 =p

Post by rosc2112 »

Major changes:

Code: Select all

## May 2006    - Added 'Observed at'  'Dew Point' 'Barometer' and 'Moonrise/set' data.
##             - Fixed various bugs, removed various redundant code, tabinated script..
## May 20 2006 - Wunderground changed "Observed At" to "Observed at" doh... Fixed script. 
##
## May 21 2006 - Added "Wind Gust" and "Barometer Rising/Falling" data. 
##               Tweaked the display output..
##             - Added Lat/Lon by request.
##             - Added US Storm Advisories/Warnings.
##             - Added Elevation
##             - Added Snow depth
##             - Fixed "Nowcast"
##             - Fixed "Windchill"
##             - Changed Forecast output.
##             - Put in a var to use an IP (or hostname if prefered) to connect 
##               to wunderground.com because my ISP's dns sucks :P
## May 22 2006 - More bugfixes..Kick an error to non-us locales trying to 
##               get precip/record data, no sense lagging them to [censored] 
##               just to find out after opening the socket the data is only for 
##               the US.
##               Ohh, and close the damn socket on returning errors in the 
##               precip code...
##             - Added record high/low temp data as a switch (.wz -r) and as 
##               '.wz record' and as a configurable default with 
##               'set wz_default_rec'
## May 24 2006 - Fixed -u so it properly returns the bad syntax error msg.
##             - Added length of day data, since some locations don't have 
##               sunrise/sunset (eg, barrow, alaska)
##             - Fixed '$location' with 'string trim' cos it was choking on empty spaces :P
##             - Added '.wz -d remove' to allow user to unset a default city.
##             - Made a test page with ALL data elements for testing :P
##             - Fixed regexp parsing of unusual moon html format after moonset
##
## Todo:
##      - Complete re-write for efficiency :P
##        It would presumably be much faster to grab the url, then work on the 
##        contents in memory, instead of repeatedly pulling the data off the socket.
##        So, porting it to use the tcl-http package would probably be better..
##      - Remove *unnecessary* foreign country code... 
##        wunderground *does* allow searching for 'city country'
##        Get rid of requiring a comma for city, state for US locales, as well.
##        And get rid of requiring US state abbreviations.
##        This will be fixed when I port the script to tcl-http.
I'll release it once its perfect =)
Last edited by rosc2112 on Fri May 26, 2006 3:28 am, edited 3 times in total.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Ok it's perfect now :P

http://members.dandy.net/~fbn/weather.2112.tcl.txt

Still need to port it to the tcl http package..Maybe tomorrow :)
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

Interesting that you have used my script for most of "your" coding and give no credit for that. I request that, since you don't want to credit my work, that you download murf's 3.4.1 script off the archive and go from there.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Its at the bottom. I tried to offer the changes to you, you didn't want them. So I published my own copy. Take it or leave it.
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

I don't mind you putting out a script, I didn't see any credits to anyone else when I read all the way through it.
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

A support thread is no place for issues such as this; use private messages.
DragnLord wrote:you don't have to use my script, there are several other scripts out there (including a new one based on mine)
Seems you don't mind too much.
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

incith wrote:Seems you don't mind too much.
I'm glad that you could read the post in which I clearly stated
DragnLord wrote:I don't mind you putting out a script
and were able to reiterate it.
Did you have anything actually new to add?
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

What's with your blatantly arrogant attitude, since we're not taking this to private.

Edit: Also, it's in my oppinion that attempting to demand credit for an originally open-source script to begin with.. is just uncool.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Maybe the moderator can delete the replies not actually related to bug reports and feature requests for this script? Maybe start a new thread "Weather Script F(l)ameness"?
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

v 2112.k

Post by rosc2112 »

Added some more features:

May 24 2006 - Made the number of forecast time periods a configurable variable "max_forecast" (limit: 14)
May 31 2006 - Added US Zipcodes in output.
Jun 10 2006 - Minor tweak for f/c temp calcs, to give more precision.
- Added Lunar phase date data (full/new/1st quarter/last quarter dates)

Same url as above.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

weather v2112.L released

Post by rosc2112 »

Small quickfix to make the script work for countries with only one reporting city.

In that situation, wunderground goes directly to the city's page, so the script's original "proc country_page" function fails, because it expects to get a page with a list of cities, which is searched for the correct city name, then that city url is returned to the main part of the script for retrieving/parsing.

An example country with only one reporting city is Malta, where the only city available is Luqa.

Eventually the "proc country_page" will be removed, as its not needed. This is planned as part of porting the script to http-tcl.

Also added "Ceiling" data into the script's output.

New version of the script is located at the usual place:
http://members.dandy.net/~fbn/weather.2112.tcl.txt
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Just so no one claims I stole this fix from DL, I fixed the problem with hyphenated cities before DL's script has been made available :P

-Kid tested, mother approved.
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

helpful hint: your code like

Code: Select all

if {[regexp -- {-p\s ?} $location]}
won't work for people using a default set on the eggdrop and there is no space after the switch
(it won't give precipitation info with defaults set for US cities)
example:
set default to Washington, DC then try

Code: Select all

.wz -p
(same thing applies to moon and sun info also)
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Tnx, fixed.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

vQ

Post by rosc2112 »

Fixed a problem with the regexp for the Precipitation code. Problem noted by hsw1955.
http://members.dandy.net/~fbn/weather.2112.tcl.txt

BTW, I'm almost finished porting this script to the http package and will make an announcement for that when it's ready. Then I will no longer be maintaining the old version.
Post Reply