<?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/9972" />

	<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-05-03T14:25:21-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2007-05-03T14:25:21-04:00</updated>

		<published>2007-05-03T14:25:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72478#p72478</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72478#p72478"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72478#p72478"><![CDATA[
$text doesn't exist, replace 'args' with 'text'.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu May 03, 2007 2:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[karodde]]></name></author>
		<updated>2007-05-03T11:21:06-04:00</updated>

		<published>2007-05-03T11:21:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=72469#p72469</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=72469#p72469"/>
		<title type="html"><![CDATA[Re: Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=72469#p72469"><![CDATA[
The Script works for my shell @ home. Now I want my eggdrop to post this Info by typing !test.<br><br>I Made this, but it doesnt work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code>#!/bin/sh# This line continues for Tcl, but is a single line for 'sh' \exec tclsh8.4 "$0" ${1+"$@"}package require tdompackage require httpset url "http://www.url.de/"set page [::http::data [::http::geturl $url]]set doc [dom parse -html $page]set root [$doc documentElement]set node [$root selectNodes {//table[@cellspacing=0]/tr[1]/td[1]}]set text [[[lindex $node 0] childNodes] nodeValue]bind pub - !test testerproc tester { nick uhost hand chan args } {putserv "PRIVMSG $chan : $text"}</code></pre></div>I got following error msg:<br>Tcl error [tester]: can't read "text": no such variable<br><br>Probably the variable text is not committed,<br>can somebody help me please? thanks <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br><br>EDIT:<br>got it,<br><div class="codebox"><p>Code: </p><pre><code>bind pub - !test thefunctionproc thefunction { nick uhost hand chan rest } {package require tdompackage require httpset url "http://www.url.de/"set page [::http::data [::http::geturl $url]]set doc [dom parse -html $page]set root [$doc documentElement]set node [$root selectNodes {//table[@cellspacing=0]/tr[1]/td[1]}]set text [[[lindex $node 0] childNodes] nodeValue]putserv "PRIVMSG $chan : $text"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8961">karodde</a> — Thu May 03, 2007 11:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[johne]]></name></author>
		<updated>2007-04-01T17:51:58-04:00</updated>

		<published>2007-04-01T17:51:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=71738#p71738</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=71738#p71738"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=71738#p71738"><![CDATA[
some more working examples would be greatly appreciated <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=6497">johne</a> — Sun Apr 01, 2007 5:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-11-16T06:17:48-04:00</updated>

		<published>2006-11-16T06:17:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=68111#p68111</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=68111#p68111"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=68111#p68111"><![CDATA[
it's not tclDOM, it's tDOM; TclDOM is completely different package that indeed requires TclXML; tDOM does not require any XML package as it itself contains XML engine<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Thu Nov 16, 2006 6:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-10-02T14:48:28-04:00</updated>

		<published>2006-10-02T14:48:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66882#p66882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66882#p66882"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66882#p66882"><![CDATA[
Assuming your shell and your local machine are running the same OS on a similar platform (eg, running freebsd on a 80868 based machine), you can compile the module statically if necessary. You can find out what libs it depends on when compiled dynamically (the usual/default method) by running  'ldd modulename'  on it. If your shell isn't running on the same platform, you'll have to cross-compile, which is beyond my own experience, so I'm not much help there.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Mon Oct 02, 2006 2:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[salkkus]]></name></author>
		<updated>2006-10-02T10:20:09-04:00</updated>

		<published>2006-10-02T10:20:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=66872#p66872</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=66872#p66872"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=66872#p66872"><![CDATA[
Hello all <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I am interested in trying this tclDOM, but my shell doesnt support compiling..<br>So, is there anything I should know when I compile it on my own machine and then copy to the shell? <br><br>Like, should the shell have all those libxml, etc installed? And if yes, how can I find out which modules are installed?<br><br>Lots of questions and too few answers <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> ( I checked many websites regarding this, but couldn't find, sort of, basic info )<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8257">salkkus</a> — Mon Oct 02, 2006 10:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-08-16T03:33:45-04:00</updated>

		<published>2006-08-16T03:33:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65519#p65519</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65519#p65519"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65519#p65519"><![CDATA[
<blockquote class="uncited"><div>man thats awesome, can someone make a little how-to guide to finding out the nessery things to phrase something off a webpage? finding out table size td row div and such using dom inspector?</div></blockquote>that would be your basic HTML primer<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Aug 16, 2006 3:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[flashy]]></name></author>
		<updated>2006-06-13T19:24:38-04:00</updated>

		<published>2006-06-13T19:24:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63993#p63993</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63993#p63993"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63993#p63993"><![CDATA[
man thats awesome, can someone make a little how-to guide to finding out the nessery things to phrase something off a webpage? finding out table size td row div and such using dom inspector?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7716">flashy</a> — Tue Jun 13, 2006 7:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2006-05-20T23:14:56-04:00</updated>

		<published>2006-05-20T23:14:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63215#p63215</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63215#p63215"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63215#p63215"><![CDATA[
Not talking about executing any utimer event every second, or every few seconds.  We are talking specifically about calling a utimer event that makes a call to the 'update' command.  Update will have to process any and all info in the event queue (not just what you think may be there), and it will not return until that has been completed, again as I stated earlier, negating the purpose of async mode altogether.  And no, newer versions of eggdrop would not be blocked as their event queue is updated every iteration of the main program loop, so having a utimer event on those bots would be pointless as the event queue would most certainly be empty already.  I have tried this on versions that required manual updating, many a time, and it did indeed result in severe performance degredation.<br>Hence the production of the egghttp.tcl script, and also a patch for certain versions as an alternative solution.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat May 20, 2006 11:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sKy]]></name></author>
		<updated>2006-05-20T11:31:03-04:00</updated>

		<published>2006-05-20T11:31:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63198#p63198</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63198#p63198"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63198#p63198"><![CDATA[
The performance. Well. To call a proc/command-update every seconds doesn`t cause a that high cpu usage. I tested it. Important is there should only run one utimer at once. If this timer is started on evey script load or reash again and again this will cause a high cpu usage for sure.<br><br>Update is simple. Do i have work to do? No? -&gt; Return. This doesn`t take that long. And if he has work to do this will block the bot just that long the newer versions of eggdrop blocked aswell too.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6101">sKy</a> — Sat May 20, 2006 11:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2006-05-19T23:25:17-04:00</updated>

		<published>2006-05-19T23:25:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63185#p63185</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63185#p63185"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63185#p63185"><![CDATA[
Yes, you could call a utimer event for 'update' every second for certain versions of eggdrop/tcl combination, however, you will be causing your bot to consume heavy cpu usage by doing so.  However, also doing update <em class="text-italics">every second</em> will render your bot inoperable for extended amounts of time, negating the purpose of the async mode altogether.<br>Performance, needless to say, would be sluggish using such a method,<br>and not be very practical.  Calling 'update' every second (or even every few seconds) is not a viable solution.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Fri May 19, 2006 11:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sKy]]></name></author>
		<updated>2006-05-19T05:36:19-04:00</updated>

		<published>2006-05-19T05:36:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63162#p63162</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63162#p63162"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63162#p63162"><![CDATA[
But you always could process the eventloop yourself. Call the update proc every second via utimer.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6101">sKy</a> — Fri May 19, 2006 5:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2006-05-13T17:28:06-04:00</updated>

		<published>2006-05-13T17:28:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62984#p62984</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62984#p62984"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62984#p62984"><![CDATA[
I didn't say the http package, I said older versions of Tcl itself and thus different eggdrop versions. (There is no event loop to facilitate the required callback mechanism of the http package in these versions)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Sat May 13, 2006 5:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2006-05-13T13:24:24-04:00</updated>

		<published>2006-05-13T13:24:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62978#p62978</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62978#p62978"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62978#p62978"><![CDATA[
refering to the header of http.tcl v2.5.1 from 2005/01/06, http supports callback (truely async) since version 2.1. I found 2.4.2 which was from 2004/04/05. You can probably guess how old 2.1 is...<br>The biggest diffrence between http and egghttp is, that egghttp uses connect and control and http uses of course socket and fileevent.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sat May 13, 2006 1:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[strikelight]]></name></author>
		<updated>2006-05-12T23:56:49-04:00</updated>

		<published>2006-05-12T23:56:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=62972#p62972</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=62972#p62972"/>
		<title type="html"><![CDATA[Parsing webpages made easy]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=62972#p62972"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div>How can I do this with egghttp?</div></blockquote>don't use egghttp, it is severily outdated; it had its use long time ago, when Tcl still didn't have the built-in http package, which is superior in any way to egghttp</div></blockquote>  No, egghttp was written even when the http package for Tcl existed.<br>However the http package is severely bloated for the function of simply grabbing a web page, not to mention it does not provide async connection across all Tcl versions, and thus all eggdrop versions.  Egghttp is still very much a practical utility today.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2005">strikelight</a> — Fri May 12, 2006 11:56 pm</p><hr />
]]></content>
	</entry>
	</feed>
