Page 1 of 2 12>
Topic Options
#71155 - 2002-10-25 09:19 PM udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I made a script to collect the udf-library topics.
funny thing is that it says that the bloody page has no more than one topic and even that one does not have author.

can't get my head over this.
script is so simple and so easy and still, no can get it.
I made so debug lines like:
?substr($pages,15)
all of those return ""
at the first point, $page[$c] returns some stuff and later on, it's empty...
this is so weird.
code:
$udfLibrary = createobject("microsoft.xmlhttp")
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum&f=12&DaysPrune=1000&submit=Go",not 1)
$udfLibrary.send
$pages=$udfLibrary.responsetext
$pages=substr($pages,instr($pages,"Page: 1"))
$pages=left($pages,instr($pages,chr(10))-3)
$pages=substr($pages,instrrev($pages,">")+1)
$pages=val(trim(left($pages,instr($pages,"<")-1)))

dim $page[$pages-1]

for $c=0 to ubound($page)
$page[$c]=""
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum;f=12;hardset=1000;start_point="+($c*25) ,not 1)
$udfLibrary.send
$pages=$udfLibrary.responsetext
$place=instr($pages,'<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=')
while $place
$pages=substr($pages,$place)
$page[$c]=$page[$c]+trim(left($pages,instr($pages,"</a>")+3))
?substr($pages,15)
$pages=substr($pages,instr($pages,'<font size="2" face="Verdana, Helvetica, sans-serif">')+54)
??$page[$c]
?substr($pages,15)
$page[$c]=$page[$c]+chr(9)+substr($pages,instr($pages,"</font>")-1)+chr(10)
?$page[$c]
?substr($pages,15)
$place=instr($pages,'<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=')
get $ if $="y" exit 0 endif
loop
next

for each $pages in $page
$pages
next
get $

_________________________
!

download KiXnet

Top
#71156 - 2002-10-26 01:34 AM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yep, found the problem.
and, it is not my script but kixtart [Razz]

kixtart has this timing or importance thing in it's stack, so even I did have print statement before get $ it did not get printed out.
anyway, it found it's way to file!

so...
will be working on this again...
_________________________
!

download KiXnet

Top
#71157 - 2002-10-26 01:44 AM Re: udf-link collector
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Is that supposed to be:
for each $pages in $page
  $pages
next

or:
for each $page in $pages
  $page
next
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71158 - 2002-10-26 01:47 AM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
the one it is [Wink]

it went all around in the midst.

{edit}
eh, the first I mean

[ 26. October 2002, 01:54: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#71159 - 2002-10-26 02:17 AM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, don't know where I'm going wrong, but decided to cut the page it generates like bb does.
every page gets 25 "pages"?

it kinda starts ok, but it does not cut it...
code:
$udfLibrary = createobject("microsoft.xmlhttp")
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum&f=12&DaysPrune=1000&submit=Go",not 1)
$udfLibrary.send
$c=$udfLibrary.responsetext
$c=substr($c,instr($c,"Page: 1"))
$c=left($c,instr($c,chr(10))-3)
$c=substr($c,instrrev($c,">")+1)
$c=val(trim(left($c,instr($c,"<")-1)))

dim $pages[$c-1]

for $c=0 to ubound($pages)
$pages[$c]=""
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum;f=12;hardset=1000;start_point="+($c*25) ,not 1)
$udfLibrary.send
$page=$udfLibrary.responsetext
$place=instr($page,'<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=')
while $place
$page=substr($page,$place)
$pages[$c]=$pages[$c]+trim(left($page,instr($page,"</a>")+3))
$page=substr($page,instr($page,'<font size="2" face="Verdana, Helvetica, sans-serif">')+54)
$pages[$c]=$pages[$c]+chr(9)+substr($page,instr($page,"</font>")-1)+"<br>"
$place=instr($page,'<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=')
loop
next
del @scriptdir+"\list.htm"
for $c=0 to ubound($pages)
$=open(1,@scriptdir+"\list$c"+".htm",5)
$=writeline(1,$pages$[c])
$=close(1)
next

_________________________
!

download KiXnet

Top
#71160 - 2002-10-26 02:23 AM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I quess I even found the reason!!!
the string 45kbytes.
kix can't handle it correctly!
_________________________
!

download KiXnet

Top
#71161 - 2002-10-26 02:47 AM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
got a new one out of it and, surely it looks perfect...

just wonder where are all the topics [Big Grin]
code:
$udfLibrary = createobject("microsoft.xmlhttp")
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum&f=12&DaysPrune=1000&submit=Go",not 1)
$udfLibrary.send
$pages=$udfLibrary.responsetext
$pages=substr($pages,instr($pages,"Page: 1"))
$pages=left($pages,instr($pages,chr(10))-3)
$pages=substr($pages,instrrev($pages,">")+1)
$pages=val(trim(left($pages,instr($pages,"<")-1)))

for $c=0 to $pages-1
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum;f=12;hardset=1000;start_point="+($c*25) ,not 1)
$udfLibrary.send
$page=$udfLibrary.responsetext
$page=split($page,'<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=')
for $=1 to ubound($page)
$page[$]='<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t='+substr($page[$],instr($page[$],"</a>")+3)
$page[$]=$page[$]+substr($page[$],instr($page[$],'<font size="2" face="Verdana, Helvetica, sans-serif">')+54)
$page[$]=left($page[$],instr($page[$],"</font>")-1)
next
$=open(1,@scriptdir+"\list$c"+".htm",5)
for each $line in $page
$=writeline(1,$line+"<br>")
next
$=close(1)
next

_________________________
!

download KiXnet

Top
#71162 - 2002-10-26 03:45 AM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok,
first really working collector.
les, this also can be pretty slow on your wksta.
50kbytes*11=5hours?
code:
$udfLibrary = createobject("microsoft.xmlhttp")
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum&f=12&DaysPrune=1000&submit=Go",not 1)
$udfLibrary.send
$pages=$udfLibrary.responsetext
$pages=substr($pages,instr($pages,"Page: 1"))
$pages=left($pages,instr($pages,chr(10))-3)
$pages=substr($pages,instrrev($pages,">")+1)
$pages=val(trim(left($pages,instr($pages,"<")-1)))
$=open(1,@scriptdir+"\listUDF"+".htm",5)

for $c=0 to $pages-1
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum;f=12;hardset=1000;start_point="+($c*25) ,not 1)
$udfLibrary.send
$page=$udfLibrary.responsetext
$page=split($page,'<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=')
for $=1 to ubound($page)
$line='<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t='+left($page[$],instr($page[$],"</a>")+3)+chr(9)
if instr($line,";p=") $line="" endif
$page[$]=substr($page[$],instr($page[$],'<font size="2" face="Verdana, Helvetica, sans-serif">')+54)
if instr($page[$],"</font>")
$nul=writeline(1,left($line+$page[$],instr($line+$page[$],"</font>")-1)+"<br>")
else
$nul=writeline(1,$line)
endif
next
next
$=close(1)

_________________________
!

download KiXnet

Top
#71163 - 2002-10-27 03:15 PM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yeah yeah yeah.
how to remove those un-udf topics?
can't mask with "()" nor "-" as all udf topic titles do not have them...

anyway, my current lister:
code:
$udfLibrary = createobject("microsoft.xmlhttp")
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum&f=12&DaysPrune=1000&submit=Go",not 1)
$udfLibrary.send
$pages=$udfLibrary.responsetext
$pages=substr($pages,instr($pages,"Page: 1"))
$pages=left($pages,instr($pages,chr(10))-3)
$pages=substr($pages,instrrev($pages,">")+1)
$pages=val(trim(left($pages,instr($pages,"<")-1)))
del @scriptdir+"\listUDF"+".htm"
$=open(1,@scriptdir+"\listUDF"+".htm",5)

for $c=0 to $pages-1
$udfLibrary.open("GET","http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=forum;f=12;hardset=1000;start_point="+($c*25) ,not 1)
$udfLibrary.send
$page=$udfLibrary.responsetext
$page=split($page,'<a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=')
for $=1 to ubound($page)
$line=left($page[$],instr($page[$],"</a>")+3)+"</td><td>"
if instr($line,";p=") $line="" endif
$page[$]=substr($page[$],instr($page[$],'<font size="2" face="Verdana, Helvetica, sans-serif">')+54)
if instr($page[$],"</font>")
$list=$list+left($line+$page[$],instr($line+$page[$],"</font>")-1)+chr(10)
else
$list=$list+$line
endif
next
next

$list=split($list,chr(10))

;sorting routine
for $c=0 to ubound($list)
if instr($list[$c],'">')
$line=split($list[$c],'">')
$list[$c]=$line[1],$line[0]
$list[$c]=join($list[$c],'">')
endif
next
$list=qs($list)
for $c=0 to ubound($list)
if instr($list[$c],'">')
$line=split($list[$c],'">')
$list[$c]=$line[1],$line[0]
$list[$c]=join($list[$c],'">')
endif
next

;write to file
$c=0 ;count udf's too
$=writeline(1,'<table><th>UDF</th><th>Author</th>')
for each $line in $list
$c=$c+1
$=writeline(1,'<tr><td><a href="http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t='+$line+'</td></tr>')
next
$=writeline(1,'</table><br>Total Count: $c')
$=close(1)

;QS() -quicksort function by brianTX
function qs($a)
DIM $b[32],$c[32],$d,$e,$f,$g,$h,$i,$j,$k,$l
$b[0]=0
$c[0]=UBOUND($a)
$d=0
While $d >=0
$e=$b[$d]
$f=$c[$d]
While $e < $f
$h=$e+($f-$e)/2
$k=$a[$e]
$A[$e]=$A[$h]
$A[$h]=$k
$i=$e+1
$j=$f
$l=0
Do
While ($i<$j) AND $A[$e] > $A[$i]
$i=$i+1
Loop
While ($j>=$i) AND $A[$j] > $A[$e]
$j=$j-1
Loop
IF $i>=$j
$l=1
ELSE
$k=$A[$i]
$A[$i]=$A[$j]
$A[$j]=$k
$j=$j-1
$i=$i+1
ENDIF
Until $l=1
$k=$a[$e]
$a[$e]=$a[$j]
$a[$j]=$k
$g=$j
If $g-$e <= $f - $g
If $g+1 < $f
$b[$d]=$g+1
$c[$d]=$f
$d=$d+1
Endif
$f=$g-1
Else
If $g-1 > $e
$b[$d]=$e
$c[$d]=$g-1
$d=$d+1
Endif
$e=$g+1
Endif
Loop
$d=$d-1
Loop
$qs=$a
Endfunction

added counter.

[ 27. October 2002, 15:42: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#71164 - 2002-10-27 03:56 PM Re: udf-link collector
krabourn Offline
Hey THIS is FUN
*****

Registered: 2000-12-11
Posts: 244
Loc: San Antonio, Texas, USA
I just ran this over a DSL line and the total time was 94 seconds.

Thanks
_________________________
Kelly

Top
#71165 - 2002-10-27 03:58 PM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I ran it over... 10 mbit "scanned" line and the total time was 10 secs.

so there could be some status but I didn't bother making that (as always)

thanks for testing and finding it working.
_________________________
!

download KiXnet

Top
#71166 - 2002-10-27 04:09 PM Re: udf-link collector
krabourn Offline
Hey THIS is FUN
*****

Registered: 2000-12-11
Posts: 244
Loc: San Antonio, Texas, USA
I just gave you the time because I saw this in one of your posts.

quote:

50kbytes*11=5hours?

_________________________
Kelly

Top
#71167 - 2002-10-27 04:14 PM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yeah yeah.
but you have too quick link for testing for modem connected users like les.
his 24kb modem should take at minimum 5 min (approx 10) to execute the query.

anyway, I've been thinking (something that I can occassionally do) that this could be done in other way.

I just forgot all my linux shell scripting skills so can't be making it so quickly...

what I was thinking was to make a separate "mirror" of this library with a collection file too...

I'll be putting something together in my mind today and see if it leads to anywhere...
_________________________
!

download KiXnet

Top
#71168 - 2002-10-27 05:12 PM Re: udf-link collector
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Jooel,
You could crawl the pages looking for the Function - EndFunction construct to determine what posts have functions.

I doubt we could have a dynamically updated page at kixtart.org but maybe you could host the page. We could then have a link to it in the Welcome and/or the FAQ.

What about sorted?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71169 - 2002-10-27 05:13 PM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
isn't it sorted already?

{edit}
eh, nice postcount btw...

[ 27. October 2002, 17:15: Message edited by: Lonkero ]
_________________________
!

download KiXnet

Top
#71170 - 2002-10-27 05:22 PM Re: udf-link collector
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The output I saw was in cronological order. Haven't tested your latest version for obvious reasons.

It would be nice to have it in aphabetical order and also by author.

BTW, nice post count for you too (4444). [Big Grin]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71171 - 2002-10-27 05:23 PM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
did you check the latest list?
my eye tells that it is indeed sorted.
_________________________
!

download KiXnet

Top
#71172 - 2002-10-27 05:29 PM Re: udf-link collector
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
OK smart-ass. I haven't made it all the way through the Today's Active Topics yet.

26.4 [Frown]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#71173 - 2002-10-27 05:33 PM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
?
what you are doing in there?
I thought you were talking about
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000290#000013
_________________________
!

download KiXnet

Top
#71174 - 2002-10-27 06:33 PM Re: udf-link collector
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
having dynamically updated page...
50k*11 currently.
then, checking if actually udf (I rather would remove those topics which are not udfs)...
about 40k per topic.
currently 273.

40k*273+50k*11≈10M!

that should take up some bandwidth.
and to make script for the server to scan those without any help from kix! huh!
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1821 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.206 seconds in which 0.169 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org