User:Dixtosa/moveToAuthorNamespace

From Wikisource
Jump to navigation Jump to search
            Site s = new Site("https://wikisource.org", "Dixtosa", password);
            PageList pl = new PageList(s);
            pl.FillAllFromCategory("Category:ავტორეფი");
            foreach (var page in pl)
            {
                Page p = (Page)page;
                if (p.title.StartsWith("A")) continue;
                try
                {
                    p.RenameTo("Author:" + p.title, "Authors should not be defined in the mainspace");
                }
                catch(Exception e)
                {
                    Thread.Sleep(40 * 1000);
                }
            }