egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

murf's weather script v2112 =p
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu May 25, 2006 1:15 am    Post subject: murf's weather script v2112 =p Reply with quote

Major changes:

Code:

## 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
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu May 25, 2006 10:13 am    Post subject: Reply with quote

Ok it's perfect now Razz

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

Still need to port it to the tcl http package..Maybe tomorrow Smile
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu May 25, 2006 10:59 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu May 25, 2006 9:36 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Thu May 25, 2006 9:42 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Fri May 26, 2006 1:08 am    Post subject: Reply with quote

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.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Fri May 26, 2006 2:29 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Fri May 26, 2006 5:15 am    Post subject: Reply with quote

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.
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Fri May 26, 2006 6:06 am    Post subject: Reply with quote

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"?
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Jun 11, 2006 12:14 pm    Post subject: v 2112.k Reply with quote

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.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Jun 18, 2006 11:58 pm    Post subject: weather v2112.L released Reply with quote

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
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Jun 26, 2006 4:45 pm    Post subject: Reply with quote

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 Razz

-Kid tested, mother approved.
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Wed Jun 28, 2006 1:11 am    Post subject: Reply with quote

helpful hint: your code like
Code:
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:
.wz -p


(same thing applies to moon and sun info also)
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Wed Jun 28, 2006 2:36 pm    Post subject: Reply with quote

Tnx, fixed.
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Wed Jul 19, 2006 9:12 pm    Post subject: vQ Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber