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.

DragnLord's weather script

Support & discussion of released scripts, and announcements of new releases.
Post Reply
g
gravdigr
Voice
Posts: 1
Joined: Mon Jan 31, 2011 10:21 pm

Dragonlords weather script

Post by gravdigr »

i now get "no report" for the temp..i've used your fix on the tcl but it returns an error..if there's any way you could send me the editted weather426.tcl i'd appreciate it..the error is
<GreenWood> [10:54] Tcl error [pub_wz]: can't read "fwhat(2)": no such element in array

wunderground must've changed their website once again..
my shell is running freebsd
thnx again
w
webmastir
Voice
Posts: 6
Joined: Fri Jan 28, 2011 12:25 am

Re: Dragonlords weather script

Post by webmastir »

gravdigr wrote:i now get "no report" for the temp..i've used your fix on the tcl but it returns an error..if there's any way you could send me the editted weather426.tcl i'd appreciate it..the error is
<GreenWood> [10:54] Tcl error [pub_wz]: can't read "fwhat(2)": no such element in array

wunderground must've changed their website once again..
my shell is running freebsd
thnx again
i edited stuff in 426 w/ the fix & noticed it was still giving no report. so i changed the few entries, listed a couple posts ago, in v *425 & everything started working again

i can post a link to 425's fixed tcl if you want
s
streamish
Voice
Posts: 21
Joined: Fri Dec 03, 2010 4:33 pm

Post by streamish »

Would like to see if I can get a little help on this issue. I've updated the weather script by replacing the °'s with °'s as aforementioned.

Code: Select all

.....    {regexp {Temperature: (.*?)°F / (.*?)°C}   .......
(just a small snippet)
However, upon rehash, it spit out an error about fwhat(1) no such element or whatever it was. So I went and commented out the lines which contained the fwhat.....

Code: Select all

                regexp {<div class=\"b\">(.*?)</div>(.*?)</td>} $cast match fwhen($f) fwhat($f)
#               regsub -all {<([^<])*>} $fwhat($f) {} fwhat($f)
#               regsub -all {[[:cntrl:]]} $fwhat($f) {} fwhat($f)
#               regsub { » ZIP Code Detail} $fwhat($f) {} fwhat($f)
#               set fcast($f) "\002$fwhen($f):\002 $fwhat($f)"
After doing that the script works. But it inserts a question mark for some reason.

Code: Select all

League City, Texas -- 3:50 PM CST Updated: 3:19 PM CST on February 01, 2011
Conditions: 42.5?F / 5.8?C | Mostly Cloudy  Humidity:  66% Windchill: 42?F / 6?C
Sunrise: 7:09 AM CST  Sunset: 5:58 PM CST
Anyone know a fix for this?

Thanks
c
cache
Master
Posts: 306
Joined: Tue Jan 10, 2006 4:59 am
Location: Mass

Post by cache »

syllable3 wrote: After doing that the script works. But it inserts a question mark for some reason.
Anything replaced by a ? is a sign that the IRC server you use doesn't support ASCII codes (#deg;). My expirence anyway.
b
bluzman
Voice
Posts: 4
Joined: Sat Jan 22, 2011 1:22 pm

Post by bluzman »

Looks like it is broken again. Typing .wz does nothing now.
w
webmastir
Voice
Posts: 6
Joined: Fri Jan 28, 2011 12:25 am

Post by webmastir »

bluzman wrote:Looks like it is broken again. Typing .wz does nothing now.
damn. yep...sure does :(

Code: Select all

[06:38] Tcl error [pub_wz]: can't read "localdate": no such variable
x
xheliox
Voice
Posts: 1
Joined: Wed Feb 02, 2011 9:16 am

Post by xheliox »

Just search and replace...

s/www.wunderground.com/classic.wunderground.com

Fixed it for me.
r
redwolf
Voice
Posts: 17
Joined: Tue Jun 26, 2007 11:24 pm

help

Post by redwolf »

s/www.wunderground.com/classic.wunderground.com

what line does that replace and is there more then one????

the localdate error in the tcl
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Post by Trixar_za »

It's TeX syntax (s/String2Match/String2ReplaceMatchWith). He means replace all occurrences of www.wunderground.com with classic.wunderground.com in the script.
Last edited by Trixar_za on Wed Feb 02, 2011 11:08 am, edited 1 time in total.
r
redwolf
Voice
Posts: 17
Joined: Tue Jun 26, 2007 11:24 pm

Post by redwolf »

ya figured it out fanks
V
Vasago
Voice
Posts: 3
Joined: Sun Jan 23, 2011 6:10 pm

Post by Vasago »

Yeah that's what fixed it for me.
User avatar
hm2k
Halfop
Posts: 57
Joined: Mon Sep 11, 2006 7:27 am
Location: UK

Post by hm2k »

You may find this useful: http://www.hm2k.com/posts/weather-tcl

It's less likely to fail as it uses Google's API rather than trying to parse a website that is subject to change.
w
webmastir
Voice
Posts: 6
Joined: Fri Jan 28, 2011 12:25 am

Post by webmastir »

hm2k wrote:You may find this useful: http://www.hm2k.com/posts/weather-tcl

It's less likely to fail as it uses Google's API rather than trying to parse a website that is subject to change.
aww! very nice. thx for the heads up on that one. Image
b
bluzman
Voice
Posts: 4
Joined: Sat Jan 22, 2011 1:22 pm

Post by bluzman »

Could someone post or upload a -fixed working- copy of weather426.tcl please? I tried the fix from above. It did not work.

Thanks in advance.
s
stock
Voice
Posts: 3
Joined: Tue Oct 25, 2005 7:48 pm
Contact:

Post by stock »

bluzman wrote:Could someone post or upload a -fixed working- copy of weather426.tcl please? I tried the fix from above. It did not work.

Thanks in advance.
The following should be working: http://irradiated.org/~stock/weather426.tcl
Post Reply