I'm trying to make a check for this script so the headline posted won't repeat if it's the same the next time it retrieves. I've tried a few things but no luck yet...
proc pub:readaap { nick uhost handle channel arg } {
set url http://www.url.com
set file news/news.txt
exec lynx -preparsed -dump -width=5000 $url > $file
set aapf [open $file r]
set data [read $aapf]
foreach line [split $data \n] {
if {[string match *17\]* $line]} {
set aap [string range $line 7 end]
foreach lines [split $data \n] {
if {[string match *17.* $lines]} {
set aapurl [string range $lines 5 end]
putserv "PRIVMSG #Newsroom :7,7 1,15 [gettime +0]ET $aap - AAP "
putserv "NOTICE #Newsroom2 :$aapurl"
break
}
}
}
}
}
