Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =// Write your own bot scripts and functions in this file.
- // Run "Compile & Run.bat" file - it will compile this file as executable and launch it.
- using System;
- using System.IO;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Collections;
- using System.Xml;
- using DotNetWikiBot;
- class MyBot : Bot
- {
- public void addEditNotice(Page input)
- {
- input.text = "{{Wikipedia information pages talk page editnotice}}";
- input.Save();
- }
- public static void Main()
- {
- Site s = new Site("https://en.wikipedia.org", "Haven’t decided bot name yet", "no password either");
- s.defaultEditComment = "Adding editnotice";
- s.minorEditByDefault = false;
- PageList l = new PageList(s);
- l.FillFromCategory("Wikipedia information pages");
- foreach (Page p in l)
- {
- string pageTitle = "Template:Editnotices/Page/" + p.title;
- Page p2 = new Page(s, pageTitle);
- if (p2.Exists)
- {
- if (p2.IsEmpty)
- {
- addEditNotice(p2);
- }
- else
- {
- continue;
- }
- }
- else
- {
- addEditNotice(p2);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement