Planning the future of Botwiki! - Help us bring Botwiki up to date, contribute to our strategy discussion, add bot scripts, and contribute manuals, guides, and tutorials! Almost anything related to bots, particularly those used to edit mediawiki, is welcome.
UNABLE TO EDIT? - We've experienced attacks by spambots lately and now require you to confirm your e-mail before you can edit (go to your preferences, enter an e-mail address, and request a confirmation e-mail, then go to your e-mail and click on the confirmation link). We also require new accounts to make a few edits and wait a few minutes before before you can create a page; however, if this is a problem contact us in #botwiki and we can manually confirm your account. Sorry for the inconvenience.
Python:NukeAll.py
SOFT REDIRECT: --> python:revertAll.py
#(MY PLAN OF) A SIMPLE ROUTINE, ON THE pyWikipedia FRAMEWORK, # FOR REMOVING *ALL* EDITS OF A USER (VANDAL) # DO "THE BEST" ACCORDING TO THE RIGHTS A USER HAS (USER, SYSOP) # WE MAY ADD CENSORSHIP IN THE FUTURE # THE FIRST STEP, "REVERSING THE PAGE MOVES" IS THE MOST NEEDED # move pages back to their rightful names # Revert all edits; remove from history if desired and possible ; # Delete all the crap or nominate them for deletion # APPOLOGIES OF ANY INELEGANCE ### SET-UP : THE PARAMETERS , THE MESSAGES, ETC vandalName = '' #IF YOUR COMMAND LINE DOESN'T SUPPORT UNICODE, # DO IT BY HAND HERE, # AND PRESS RETURN WHEN THE PROMPT "name of vandal" APPEARS timestamp = '' #SET THE TIMESTAMP HERE AND IGNORE THE MANUAL INPUT, IF YOU LIKE uclimit = 500 #SET IT TO 5000 FOR A ROBOT, IF YOU LIKE x = raw_input('name of vandal?') if x!= '': vandalName = x a = raw_input('timestamp?') if a!= '': timestamp = a ### SUGGESTION: SET THE DEFAULT TIME LIMIT TO 2 HOURS, ### I.E. REVERTS ALL EDITS FROM AN IP-ADDRESS OR A USER ### TO WITHIN 2 HOURS (OR PERHAPS ONE DAY?) ### OPTIONAL PARAMETER: REVERT ALL THOSE AFTER A CERTAIN TIMESTAMP ### OR REVISION ID ### IMPORTING THE MODULES; CREATING THE SITE OBJECT import wikipedia import re import ??????????? site = wikipedia.getSite() ### ZERO: BLOCK THE USER ### GETTING THE LIST OF ALL CONTRIBUTIONS OF THE VANDAL # USE API? #http://meta.wikimedia.org/w/api.php?action=query&list=usercontribs&ucuser=hillgentleman&ucstart=2007010101000000 # wikipedia.apipath() + '?action=query&list=usercontribs&ucuser=' + vandalName + '&ucstart=' timestamp + '&uclimit=' + uclimit list = ???????????.contributions(vandalName) ### ANALYSIING THE LIST, DECIDING ON THE ACTIONS... ### EASIEST IS A PAGE WITH ONLY ONE EDITOR - FLAG IT FOR DELETION STEP3 ### NEXT WE HAVE SIMPLE REVERTS - FLAG IT FOR STEP 2 ### PAGE MOVES, OR EVEN MULTIPLE PAGE MOVES - ### WE NEED TO CHECK THE EDIT COMMENTS ### AND PUT IT BACK TO THE ORIGINAL PLACE - ### - FIND THE PRECISE ACTION (MANUAL INPUT EVEN) ### - FLAG IT FOR STEP 1 BELOW ### FIRST: REVERSE ALL PAGE MOVES ### SECOND: REVERT ALL EDITS ### THIRD: DELETE ALL THE CRAP - THE REDIRECTS AND NEWPAGES ### FOUR: (OPTIONAL) REPORT TO THE COMMUNITY