publicstringProcessArticle(stringArticleText,stringArticleTitle,intwikiNamespace,outstringSummary,outboolSkip){Skip=false;Summary="test";List<Article>cats=CatList(ArticleTitle);ArticleText=("\r\n"+"Current cats"+"\r\n");foreach(Articlexincats)ArticleText+=(x.Name+"\r\n");List<Article>catsAfter=CatListAfter(ArticleTitle,@"{{dn}}");ArticleText+="\r\n"+"After cats"+"\r\n";foreach(ArticlexincatsAfter)ArticleText+=(x.Name+"\r\n");returnArticleText;}// report categories currently on given pagepublicstaticList<Article>CatList(stringarticleTitle){WikiFunctions.Lists.Providers.CategoriesOnPageListProviderx=newWikiFunctions.Lists.Providers.CategoriesOnPageListProvider();List<Article>cats=x.MakeList(new[]{articleTitle});returncats;}// report categories that would be on given page with given input article textpublicstaticList<Article>CatListAfter(stringArticleTitle,stringArticleText){WikiFunctions.Controls.Lists.ListMakerlm=newWikiFunctions.Controls.Lists.ListMaker();// https://en.wikipedia.org/w/api.php?format=xml&action=parse&prop=categories&title=a&text=a{{dn}}stringurl=@"https://en.wikipedia.org/w/api.php?format=xml&action=parse&prop=categories&title="+System.Web.HttpUtility.UrlEncode(ArticleTitle)+"&text="+System.Web.HttpUtility.UrlEncode(ArticleText);stringres=Tools.GetHTML(url);Regexr=newRegex(@">([^<>]+)</cl>");List<Article>cats=newList<Article>();foreach(Matchminr.Matches(res))cats.Add(newArticle(lm.NormalizeTitle("Category:"+m.Groups[1].Value.Replace("_"," "))));returncats;}