Pybot Wiki

This page describes a script. In general, it refers to the script in its current form, but pywikpedia coders tend only to add functions, not take them away. Chances are that you'll be able to use most of the information on the page, regardless of the age of your installation.
Creator: The Pywikipedia team
Code location: wikimedia repository
What it does: Page deletion
Complexity: Basic is a script that allows bots with sysop rights to delete pages, either individually or en masse. This script can still be used by bots which do not have sysop rights; instead of deleting the page, though, the bot will simply mark the page with the template, {{Db-r1}}.

Command Line Examples

In its most basic form, is formatted like so:

python -page:Page_Name -summary:"Enter a reason here."

This will make the bot delete the page if sysop rights are granted, or flag the page with {{Db-r1}} if not, with the summary provided.

To delete multiple pages within a category, you can use the following line:

python -cat:"Category name" -summary:"Enter a reason here."

You can also use the script to delete pages listed in a plain text (.txt) file with the following line:

python -file:filename.txt -summary:"Enter a reason here."

To have your bot delete pages listed in a plain text file you must list the pages in the following format:

# [[Page One]]
# [[Page Two]]
# [[Page Three]]
# [[Page Four]]
# [[Page Five]]

Full list of available parameters

-page: Delete specified page
-cat: Delete all pages in the given category.
-links: Delete all pages linked from a given page.
-file: Delete all pages listed in a text file.
-ref: Delete all pages referring from a given page.
-images: Delete all images used on a given page.
-always: Don't prompt to delete pages, just do it.
-summary: Supply a custom edit summary.
-undelete: Actually undelete pages instead of deleting. Obviously makes sense only with -page and -file.