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

	<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>2011-03-05T19:49:33-04:00</updated>

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

		<entry>
		<author><name><![CDATA[semisonic]]></name></author>
		<updated>2011-03-05T19:49:33-04:00</updated>

		<published>2011-03-05T19:49:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96322#p96322</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96322#p96322"/>
		<title type="html"><![CDATA[Http Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96322#p96322"><![CDATA[
Thanks Very Much Arfer....<br><br>That is a start <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>I will try and build on from there <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Thanks for your time..<br><br>Sonic<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11586">semisonic</a> — Sat Mar 05, 2011 7:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arfer]]></name></author>
		<updated>2011-03-05T16:39:54-04:00</updated>

		<published>2011-03-05T16:39:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96316#p96316</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96316#p96316"/>
		<title type="html"><![CDATA[Http Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96316#p96316"><![CDATA[
You may be able to make something of this code, It takes the site data and lappends it to a list variable. For testing a PUB bind using the command !scan is used and the data written to a text file (scanner.txt) in the bots root directory.<br><br>Note that it should be considered very much a work in progress for you to adapt if it is any use. No error messages are coded in case the bot cannot connect, or for http timeout. error or unexpected ncode. Likewise html codes such as &gt; or &amp; etc have not been translated.<br><div class="codebox"><p>Code: </p><pre><code># scanner.tclpackage require httpbind PUB - !scan pScannerScrapeproc pScannerScrape {minute hour day weekday year} {    set agent [::http::config -useragent "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"]    set url http://www.centralcoastonlinescanner.com/pager/filter.html    if {![catch {set token [::http::geturl $url -timeout 10000]}]} {        switch -- [::http::status $token] {            "timeout" {}            "error" {}            "ok" {                switch -- [::http::ncode $token] {                    200 {                        regexp -nocase -- {&lt;table&gt;(.*?)&lt;/table&gt;} [::http::data $token] -&gt; data                        pScannerParse $data                    }                    default {}                }            }            default {}        }        ::http::cleanup $token    } else {}    return 0}proc pScannerParse {data} {    global vScannerDatalist    foreach line [split $data \n] {        if {![regexp -nocase -- {&lt;tr&gt;&lt;td colspan=\"3\"&gt;&lt;hr&gt;&lt;/td&gt;&lt;/tr&gt;} $line]} {            set temp [string trim [regsub -all -- {\s{2,}} [regsub -all -- {(&lt;[^&gt;]+&gt;)|(\t)} $line { }] { }]]            if {[string length $temp] != 0} {                lappend vScannerDatalist $temp            }        } else {lappend vScannerDatalist "--------------------------------------------------"}    }    pScannerWrite    return 0}proc pScannerWrite {} {    global vScannerDatalist    set fp [open scanner.txt w]    foreach line $vScannerDatalist {        puts $fp $line    }    close $fp    unset -nocomplain -- vScannerDatalist    return 0}putlog "scanner.tcl loaded"# eof</code></pre></div>Here is a portion of the beginning of the text file :-<br><br>18:00:32 04-03-11 FIRE DANGER RATINGS FOR SATURDAY IS HIGH PLEASE ADJUST ROADSIDE FIRE DANGER METERS. THANK YOU - Wyong RFS Message -<br>18:00:18 04-03-11 FIRE DANGER RATINGS FOR SATURDAY IS HIGH PLEASE ADJUST ROADSIDE FIRE DANGER METERS. THANK YOU - Wyong RFS Message -<br>18:00:11 04-03-11 FIRE DANGER RATINGS FOR SATURDAY IS HIGH PLEASE ADJUST ROADSIDE FIRE DANGER METERS. THANK YOU - Wyong RFS Message -<br>--------------------------------------------------<br>17:58:28 04-03-11 FIRE DANGER RATINGS FOR SATURDAY IS LOW- MODERATE PLEASE ADJUST ROADSIDE FIRE DANGER METERS. THANK YOU - Lake Macquarie RFS Message -<br>17:58:21 04-03-11 FIRE DANGER RATINGS FOR SATURDAY IS LOW- MODERATE PLEASE ADJUST ROADSIDE FIRE DANGER METERS. THANK YOU - Lake Macquarie RFS Message -<br>17:58:14 04-03-11 FIRE DANGER RATINGS FOR SATURDAY IS LOW- MODERATE PLEASE ADJUST ROADSIDE FIRE DANGER METERS. THANK YOU - Lake Macquarie RFS Message -<br>--------------------------------------------------<br>17:49:04 04-03-11 CAT 2 BACK IN SERVICE - Wyee Point RFS -<br>17:48:59 04-03-11 CAT 2 BACK IN SERVICE - Wyee Point RFS -<br>17:48:54 04-03-11 CAT 2 BACK IN SERVICE - Wyee Point RFS -<br>--------------------------------------------------<br>17:39:54 04-03-11 STOP MESSAGE - Awaba RFS -<br>17:39:50 04-03-11 STOP MESSAGE - Awaba RFS -<br>17:39:40 04-03-11 STOP MESSAGE - Awaba RFS -<br>--------------------------------------------------<br>17:25:05 04-03-11 thanks. - Arcadia RFS -<br>--------------------------------------------------<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5705">arfer</a> — Sat Mar 05, 2011 4:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[semisonic]]></name></author>
		<updated>2011-03-05T00:57:46-04:00</updated>

		<published>2011-03-05T00:57:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96305#p96305</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96305#p96305"/>
		<title type="html"><![CDATA[Http Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96305#p96305"><![CDATA[
*Bump*<br><br>*Bump*<br><br>Can someone at least help me with Regsub to get the info out<br><br>or how to get the code to display?<br><br>Thanks<br>Sonic<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11586">semisonic</a> — Sat Mar 05, 2011 12:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[semisonic]]></name></author>
		<updated>2011-03-03T10:36:03-04:00</updated>

		<published>2011-03-03T10:36:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=96284#p96284</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=96284#p96284"/>
		<title type="html"><![CDATA[Http Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=96284#p96284"><![CDATA[
Hey Guys,<br><br>I own a radio scanner site and would like to pull data from a html page that is generated by a pager decode program into irc when new lines are added/updated in the html file..<br><br><a href="http://www.centralcoastonlinescanner.com/pager/filter.html" class="postlink">http://www.centralcoastonlinescanner.co ... ilter.html</a> is where the data is stored..<br><br>As you can see there is alot of double which hopefully the tcl script can get rid of.. if not that's cool..<br><br>So i need the data in between each ------ (&lt;HR&gt;) displayed in the channel<br>say the last 5 lines when !trig and just the last update line automaticly (If possible) if not the last 5 updated lines will be fine..<br><br>How do i parse the crap and just leaving the data between &lt;tr&gt; and &lt;/tr&gt; or even&lt;td&gt; and &lt;/td&gt; in a format like on the Html page minus color?<br><br>Thanks in advance<br>Sonic<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11586">semisonic</a> — Thu Mar 03, 2011 10:36 am</p><hr />
]]></content>
	</entry>
	</feed>
