tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,25 @@
|
|||
OpenConsole()
|
||||
URLDownloadToFile_( #Null, "http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=500&format=xml", "tasks.xml", 0, #Null)
|
||||
ReadFile(0, "tasks.xml")
|
||||
x1$ = ReadString(0)
|
||||
Repeat
|
||||
x2 = FindString(x1$, "title=", x2 + 1)
|
||||
If x2
|
||||
title$ = Mid(x1$, x2 + 7, 99)
|
||||
title$ = Left(title$, FindString(title$, ">", 1) - 4)
|
||||
URLDownloadToFile_( #Null, "http://www.rosettacode.org/w/index.php?title=" + title$ + "&action=raw", "task.xml", 0, #Null)
|
||||
ReadFile(1, "task.xml")
|
||||
While Not Eof(1)
|
||||
y1$ = ReadString(1)
|
||||
If FindString(y1$, "=={{header|", 1)
|
||||
j + 1
|
||||
EndIf
|
||||
Wend
|
||||
PrintN( title$ +": " + Str(j) + " examples")
|
||||
k + j
|
||||
j = 0
|
||||
CloseFile(1)
|
||||
EndIf
|
||||
Until x2 = 0
|
||||
PrintN("Total: " + Str(k) + " examples")
|
||||
Input()
|
||||
Loading…
Add table
Add a link
Reference in a new issue