Module RankLanguages { Const Part1$="{ Declare htmldoc "Msxml2.ServerXMLHTTP" With htmldoc , "readyState" as ready Report "Download:"+url$ Method htmldoc "open","get", url$, True Method htmldoc "send" Profiler While Ready<>4 { Wait 20 Print Over format$("Wait: {0:3} sec", timecount/1000) If timecount>timeout then Exit } If ready=4 Then With htmldoc, "responseText" as ready$ : =ready$ Declare htmldoc Nothing print } languages$=httpGet$(langHttp$, 30000) If Doc.Len(languages$)=0 then Error "File download failed (languages)" Inventory Lang m=Paragraph(languages$, 0) If Forward(languages$,m) then { While m { job$=Paragraph$(languages$,(m)) If Instr(job$, part1$) Else Continue i = Instr(job$, "") If i Else Continue ' same as If i=0 Then Continue j = i i=Rinstr(job$, ">", -i) If i Else Continue LastLang$=MID$(job$, i+1, j-i-1) if Instr(job$, "Category:"+lastlang$) then Append lang, lastlang$:=0 : Print Over format$("Languages: {0}", len(lang)) } } Print Document categories$=httpGet$(categoriesHttp$, 30000) If Doc.Len(categories$)=0 then Error "File download failed (categories)" limit=Doc.Par(categories$) If limit", -i) If i Else Continue LastLang$=MID$(job$, i+1, j-i-1) If Exist(Lang, LastLang$) Then { Return Lang, LastLang$:=Lang(LastLang$)+tasks } } } Print \\ this type of inventory can get same keys \\ also has stable sort Report "Make Inventory list by Task" Inventory queue ByTask t1=Len(Lang) T=Each(Lang) While T { Append ByTask, Eval(T):=Eval$(T!) Print Over format$("Complete: {0} of {1}", T^+1, t1 ) } Print Report "Sort by task (stable sort, sort keys as numbers)" Sort descending ByTask as number Report "Make List" T=Each(ByTask) final$="Sample output on "+Date$(Today, 1033, "long date")+{: } While T { final$=format$("rank:{0::-4}. {1:-5} entries - {2}", T^+1, Eval$(T!), Eval$(T))+{ } } Report "Copy to Clipboard" clipboard final$ \\ present to console with 3/4 fill lines then stop for space bar or mouse click to continue Report final$ } RankLanguages