<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/9980" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2007-02-10T22:20:43-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/9980</id>

		<entry>
		<author><name><![CDATA[romeo5k]]></name></author>
		<updated>2007-02-10T22:20:43-04:00</updated>

		<published>2007-02-10T22:20:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70379#p70379</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70379#p70379"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70379#p70379"><![CDATA[
sorry to sound stoopid Alchera, but where in the script do u want me to insert that.. This way i dont get an error for insetrting it in the wrong place...  Sorry for a noob question if it is.!<br>********************<br>edit**<br> i inserted it after here <div class="codebox"><p>Code: </p><pre><code>setudef flag tvset errorInfo </code></pre></div> &lt;---- and got nothing...<br> I also inserted it after here <div class="codebox"><p>Code: </p><pre><code>set data [string map {"\n" ""} $data] set data [string map {"&lt;/tr&gt;" "&lt;/tr&gt;\n"} $data] set data [string map {"&lt;/div&gt;" "&lt;/div&gt;\n"} $data] set data [string map {"&lt;/td&gt;" "&lt;/td&gt;~"} $data] set data [string map {"f-normal\"&gt;" "f-normal\"&gt;~"} $data]  set errorInfo</code></pre></div> &lt;---- and still got nothing..<br>I still get no errors.. no nothing..<br> Lemme ask a stoopid question..: The trigger is set to <div class="codebox"><p>Code: </p><pre><code>!tonight</code></pre></div>  by default, correct? At least thats what ive been useing..<br>Also.. i DID NOT use the editing code that avilon posted.. im using the complete default thats on the first post.!<br>Sorry for the stoopid questions but im in between beginer and intermediate!!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8025">romeo5k</a> — Sat Feb 10, 2007 10:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2007-02-10T02:21:24-04:00</updated>

		<published>2007-02-10T02:21:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70362#p70362</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70362#p70362"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70362#p70362"><![CDATA[
Post the results of:<div class="codebox"><p>Code: </p><pre><code>.set errorInfo</code></pre></div>... you may be better assisted.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Sat Feb 10, 2007 2:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[romeo5k]]></name></author>
		<updated>2007-02-10T00:08:38-04:00</updated>

		<published>2007-02-10T00:08:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70361#p70361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70361#p70361"/>
		<title type="html"><![CDATA[hmmm]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70361#p70361"><![CDATA[
i loaded , and it shows in partyline that everything was loaded..  Now i go to the channel and type !tonight and i get no error. but i dont get the shows either. this is what i did so far.<br> I copied the script above and pasted and made it a tcl.<br> then i inserted the egghttp in the scripts<br> i changed the offset thing to  -6<br> and i wentinto partyline and typed .chanset #testing +tv<br>So with all that said, where did i mess up on??<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8025">romeo5k</a> — Sat Feb 10, 2007 12:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Lumsk]]></name></author>
		<updated>2006-12-12T21:49:34-04:00</updated>

		<published>2006-12-12T21:49:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68935#p68935</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68935#p68935"/>
		<title type="html"><![CDATA[wish...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68935#p68935"><![CDATA[
Hehe.. I wish there was a Norwegian version of this script  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8492">Lumsk</a> — Tue Dec 12, 2006 9:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[trooper]]></name></author>
		<updated>2005-10-10T03:43:16-04:00</updated>

		<published>2005-10-10T03:43:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=56500#p56500</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=56500#p56500"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=56500#p56500"><![CDATA[
Any requirements beyond egghttp.tcl and tv.com.tcl ? egg version? newer cookies?<br><div class="codebox"><p>Code: </p><pre><code>[09:42] &lt;&lt;trooper&gt;&gt; !trooper! !tonight </code></pre></div>Does not give me any output, but i dont see any errors either. Chanset' +tv.<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6833">trooper</a> — Mon Oct 10, 2005 3:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-08-17T19:02:45-04:00</updated>

		<published>2005-08-17T19:02:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54403#p54403</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54403#p54403"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54403#p54403"><![CDATA[
<blockquote class="uncited"><div>Back to the original topic.....<br><br>im getting an error all of a sudden when i do !imdb<br><div class="codebox"><p>Code: </p><pre><code>Tcl error [imdb_proc]: can't read "location": no such variable</code></pre></div><br>Any fixes possible please ?<br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"></div></blockquote>I'd suggest you <strong class="text-strong">READ</strong> this threads subject. It has nothing whatever to do with imbd.tcl. Contact the author.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Wed Aug 17, 2005 7:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theauth0r]]></name></author>
		<updated>2005-08-17T18:54:36-04:00</updated>

		<published>2005-08-17T18:54:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=54401#p54401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=54401#p54401"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=54401#p54401"><![CDATA[
Back to the original topic.....<br><br>im getting an error all of a sudden when i do !imdb<br><div class="codebox"><p>Code: </p><pre><code>Tcl error [imdb_proc]: can't read "location": no such variable</code></pre></div><br>Any fixes possible please ?<br><br><img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6558">theauth0r</a> — Wed Aug 17, 2005 6:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[koom]]></name></author>
		<updated>2005-08-07T04:28:31-04:00</updated>

		<published>2005-08-07T04:28:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53798#p53798</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53798#p53798"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53798#p53798"><![CDATA[
hi there greenbear, <br><br>a bit off topic from this, but would you be able to make a script that parses tv show information from tv.com?<br><br>Example here:<br><a href="http://forum.egghelp.org/viewtopic.php?t=10211" class="postlink">http://forum.egghelp.org/viewtopic.php?t=10211</a><br><br>I understand if you dont really feel like making this script, but hopefully you can nudge me in the right direction (keeping in mind that i am a noob at tcl..)<br><br>Thanks alot,<br>koom<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6543">koom</a> — Sun Aug 07, 2005 4:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-08-05T10:24:57-04:00</updated>

		<published>2005-08-05T10:24:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53733#p53733</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53733#p53733"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53733#p53733"><![CDATA[
I'm no big fan of long lines, so I like to split stuff up so it's easier to read.<br>[list ...] and {...} is the same thing, btw.<br><br>I really should stop using regexp for everything, though... old habits die hard  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_eek.gif" width="15" height="15" alt=":shock:" title="Shocked"><br><br>Thanks for the tips on coding styles that I didn't ask for, though.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Fri Aug 05, 2005 10:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[avilon]]></name></author>
		<updated>2005-08-05T07:30:05-04:00</updated>

		<published>2005-08-05T07:30:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53728#p53728</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53728#p53728"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53728#p53728"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code> set data [string map {"\n" ""} $data] set data [string map {"&lt;/tr&gt;" "&lt;/tr&gt;\n"} $data] set data [string map {"&lt;/div&gt;" "&lt;/div&gt;\n"} $data] set data [string map {"&lt;/td&gt;" "&lt;/td&gt;~"} $data] set data [string map {"f-normal\"&gt;" "f-normal\"&gt;~"} $data]</code></pre></div>You could merge them in a single "string map" using <ul><li><div class="codebox"><p>Code: </p><pre><code>set data [string map [list \n "" "&lt;/tr&gt;" "&lt;/tr&gt;\n" "&lt;/div&gt;" "&lt;/div&gt;\n" "&lt;/td&gt;" "&lt;/td&gt;~" "f-normal\"&gt;"  "f-normal\"&gt;~"] $data]</code></pre></div>Instead of <div class="codebox"><p>Code: </p><pre><code>if ![regexp -nocase {[0-9]:[0-9][0-9][am|pm]} $out] {</code></pre></div> you should use <div class="codebox"><p>Code: </p><pre><code>if ![string match -nocase {[0-9]:[0-9][0-9][ap]m} $out]</code></pre></div> which is about 5 times faster.</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5191">avilon</a> — Fri Aug 05, 2005 7:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-08-04T22:21:34-04:00</updated>

		<published>2005-08-04T22:21:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53723#p53723</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53723#p53723"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53723#p53723"><![CDATA[
I updated the code posted above.<br><br>Remember to change 'tvoffset' so it matches your timezone.<br>It's needed to create the cookie.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Thu Aug 04, 2005 10:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[theauth0r]]></name></author>
		<updated>2005-08-04T17:04:15-04:00</updated>

		<published>2005-08-04T17:04:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53715#p53715</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53715#p53715"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53715#p53715"><![CDATA[
Anyone got an updated version of this please.?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6558">theauth0r</a> — Thu Aug 04, 2005 5:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2005-08-04T22:19:14-04:00</updated>

		<published>2005-07-07T19:01:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51958#p51958</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51958#p51958"/>
		<title type="html"><![CDATA[tv.com.tcl - parses tonights tv shows from tv.com]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51958#p51958"><![CDATA[
Show what's on tv tonight<br><div class="codebox"><p>Code: </p><pre><code>############################################# tv.com.tcl v0.2 by greenbear at gmail.com## Parses tonights tv shows from tv.com## Enable with .chanset #channel +tv## offset to EST# 6 hours makes sense for CET (Europe)set tvoffset 6bind pub - !tonight pub:tv.comif ![info exists egghttp(version)] {  putlog "egghttp.tcl was NOT successfully loaded."}setudef flag tvproc pub:tv.com {nick uhost hand chan text} {  if ![channel get $chan tv] return  set d [strftime %m%d%y]  set d [date:offset [clock seconds] %m%d%y]  set sock [egghttp:geturl http://www.tv.com/ [list parse:tv.com $chan] -headers "Cookie: tv_promo_$d=1"]}proc parse:tv.com {chan sock} { set data [egghttp:data $sock] egghttp:cleanup $sock set data [string map {"\n" ""} $data] set data [string map {"&lt;/tr&gt;" "&lt;/tr&gt;\n"} $data] set data [string map {"&lt;/div&gt;" "&lt;/div&gt;\n"} $data] set data [string map {"&lt;/td&gt;" "&lt;/td&gt;~"} $data] set data [string map {"f-normal\"&gt;" "f-normal\"&gt;~"} $data] set parse 0 foreach line [split $data \n] {  if [string match -noc "*&lt;h3&gt;What's On Tonight&lt;/h3&gt;*" $line] {set parse 1}  if {$parse&amp;&amp;[string match -noc *&lt;/table&gt;* $line]} {return}  if {$parse} {    regsub -all {&lt;(.|\n)*?&gt;} $line {} clean    set out [join $clean]    if {$out!=""&amp;&amp;$out!="~"&amp;&amp;![string match -noc "*What's On Tonight*" $out]} {      set ts [concat [lindex [split $out ~] 0]]      set ch [concat [lindex [split $out ~] 3]]      set sh [concat [lindex [split $out ~] 1]]      set ep [concat [lindex [split $out ~] 2]]      if ![regexp -nocase {[0-9]:[0-9][0-9][am|pm]} $out] {        putserv "PRIVMSG $chan :$sh \002\[\002\00304$ep\017\002\]\002 ($ch)"      } {        putserv "PRIVMSG $chan :$sh \002\[\002\00304$ep\017\002\]\002 ($ch at $ts)"      }    }  } }}proc date:offset {epox arg} { set t [expr $epox-((60*60)*$::tvoffset)] set w [clock format $t -format $arg] return $w}putlog "* tv.com.tcl loaded."</code></pre></div>Updated to work with tv.com's new cookies<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Thu Jul 07, 2005 7:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
