Data update

This commit is contained in:
Ingy döt Net 2024-10-16 18:07:41 -07:00
parent 81fd053722
commit 52a6ef48dd
10248 changed files with 63654 additions and 6775 deletions

View file

@ -1,21 +0,0 @@
ClearAll[ImportAll]
ImportAll[lang_String] :=
Module[{data, continue, cmcontinue, extra, xml, next},
data = {};
continue = True;
cmcontinue = "";
While[continue,
extra = If[cmcontinue =!= "", "&cmcontinue=" <> cmcontinue, ""];
xml = Import["http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:" <> lang <> "&cmlimit=500&format=xml" <> extra, "XML"];
AppendTo[data, Cases[xml, XMLElement["cm", _, {}], \[Infinity]]];
next = Flatten[Cases[xml, {"cmcontinue" -> _}, \[Infinity]]];
If[Length[next] > 0,
next = First[next];
cmcontinue = "cmcontinue" /. next;
,
continue = False;
];
];
Cases[Flatten[data], HoldPattern["title" -> x_] :> x, \[Infinity]]
]
Complement[ImportAll["Programming_Tasks"], ImportAll["Mathematica"]]

View file

@ -1,13 +0,0 @@
url = "http://rosettacode.org/wiki/Reports:Tasks_not_implemented_in_Mathematica";
html = Import[url, "XMLObject"];
pos = Position[html, XMLElement["div", {"class" -> "mw-content-ltr", "dir" -> "ltr", "lang" -> "en"}, ___]];
pos = First[pos];
data = Extract[html, pos];
pos = Position[data, XMLElement["li", {}, {XMLElement["a", {"shape" -> "rect", "href" -> _, "title" -> x_}, {x_}]}]];
data = Extract[data, pos];
data = data[[All, -1, -1, 2]];
data = {"title", "href"} /. # & /@ %;
data[[All, 2]] = "http://rosettacode.org" <> # & /@ data[[All, 2]];
newb = data[[All, 1]];
data = Hyperlink @@@ data;
data // Column

View file

@ -0,0 +1,20 @@
ClearAll[ImportAll];
ImportAll[lang_String] :=
Module[{data = {}, continue = True, cmcontinue = "", xml},
While[continue,
xml = Import[
"http://www.rosettacode.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:" <>
lang <>
"&cmlimit=500&format=xml&cmcontinue=" <>
cmcontinue,
"XML"];
AppendTo[data, Cases[xml, XMLElement["cm", _, {}], Infinity]];
cmcontinue = Cases[xml, XMLElement["continue", cmcontinue_, {}] :> cmcontinue, Infinity];
If[Length[cmcontinue] > 0,
cmcontinue = Last@First@First@cmcontinue;,(*else*)
cmcontinue = "";];
continue = (cmcontinue != "");];
Return[Cases[data, HoldPattern["title" -> x_] :> x, Infinity]];];
unimplementedTasks =
Complement[ImportAll["Programming_Tasks"], ImportAll["Mathematica"]]