Pywikibot/delete.py

From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Odessaukrain (talk | contribs) at 02:35, 8 January 2007 (Pywikipedia). It may differ significantly from the current version.

This script can be used to delete pages en masse.

You will need an admin account on the relevant wiki.

Also add:

sysopnames['wikipedia']['en'] = 'adminname'

To user-config.py

Where ['wikipedia'] is the name of the mediawiki

'adminname' is the username

Examples:

Delete everything in the category "To delete" without prompting.

   python delete.py -category:"To delete" -always

Delete everything in the pages lined to the page, without prompting.

   python delete.py "deletepage" -always


-category: Delete all pages in the given category.
-links: Delete all pages linked from a given page.
-always Don't prompt to delete pages, just do it.
-summary: Supply a custom edit summary.