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 

DragnLord's weather script
Goto page Previous  1, 2, 3 ... , 22, 23, 24  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
gravdigr
Voice


Joined: 31 Jan 2011
Posts: 1

PostPosted: Mon Jan 31, 2011 10:31 pm    Post subject: Dragonlords weather script Reply with quote

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
Back to top
View user's profile Send private message
webmastir
Voice


Joined: 28 Jan 2011
Posts: 6

PostPosted: Tue Feb 01, 2011 8:40 am    Post subject: Re: Dragonlords weather script Reply with quote

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
Back to top
View user's profile Send private message
streamish
Voice


Joined: 03 Dec 2010
Posts: 21

PostPosted: Tue Feb 01, 2011 5:54 pm    Post subject: Reply with quote

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 &deg;'s as aforementioned.
Code:
.....    {regexp {Temperature: (.*?)&deg;F / (.*?)&deg;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:
                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 { &raquo; 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:
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
Back to top
View user's profile Send private message
cache
Master


Joined: 10 Jan 2006
Posts: 306
Location: Mass

PostPosted: Tue Feb 01, 2011 10:21 pm    Post subject: Reply with quote

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


Joined: 22 Jan 2011
Posts: 4

PostPosted: Wed Feb 02, 2011 5:17 am    Post subject: Reply with quote

Looks like it is broken again. Typing .wz does nothing now.
Back to top
View user's profile Send private message
webmastir
Voice


Joined: 28 Jan 2011
Posts: 6

PostPosted: Wed Feb 02, 2011 8:39 am    Post subject: Reply with quote

bluzman wrote:
Looks like it is broken again. Typing .wz does nothing now.


damn. yep...sure does Sad


Code:

[06:38] Tcl error [pub_wz]: can't read "localdate": no such variable
Back to top
View user's profile Send private message
xheliox
Voice


Joined: 02 Feb 2011
Posts: 1

PostPosted: Wed Feb 02, 2011 9:17 am    Post subject: Reply with quote

Just search and replace...

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

Fixed it for me.
Back to top
View user's profile Send private message
redwolf
Voice


Joined: 26 Jun 2007
Posts: 17

PostPosted: Wed Feb 02, 2011 10:55 am    Post subject: help Reply with quote

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

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

the localdate error in the tcl
Back to top
View user's profile Send private message
Trixar_za
Op


Joined: 18 Nov 2009
Posts: 143
Location: South Africa

PostPosted: Wed Feb 02, 2011 11:05 am    Post subject: Reply with quote

It's TeX syntax (s/String2Match/String2ReplaceMatchWith). He means replace all occurrences of www.wunderground.com with classic.wunderground.com in the script.
_________________
http://www.trixarian.net/Projects


Last edited by Trixar_za on Wed Feb 02, 2011 11:08 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
redwolf
Voice


Joined: 26 Jun 2007
Posts: 17

PostPosted: Wed Feb 02, 2011 11:06 am    Post subject: Reply with quote

ya figured it out fanks
Back to top
View user's profile Send private message
Vasago
Voice


Joined: 23 Jan 2011
Posts: 3

PostPosted: Wed Feb 02, 2011 1:31 pm    Post subject: Reply with quote

Yeah that's what fixed it for me.
Back to top
View user's profile Send private message
hm2k
Halfop


Joined: 11 Sep 2006
Posts: 57
Location: UK

PostPosted: Wed Feb 02, 2011 3:56 pm    Post subject: Reply with quote

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


Joined: 28 Jan 2011
Posts: 6

PostPosted: Wed Feb 02, 2011 7:17 pm    Post subject: Reply with quote

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


Joined: 22 Jan 2011
Posts: 4

PostPosted: Wed Feb 02, 2011 8:15 pm    Post subject: Reply with quote

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


Joined: 25 Oct 2005
Posts: 3

PostPosted: Thu Feb 03, 2011 6:41 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website AIM Address
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 Previous  1, 2, 3 ... , 22, 23, 24  Next
Page 23 of 24

 
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