FANDOM


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.

Delete.py
Creator: The Pywikipedia team
Code location: wikimedia repository
What it does: Page deletion
Complexity: Basic


Delete.py 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, delete.py is formatted like so:

python delete.py -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 delete.py -cat:"Category name" -summary:"Enter a reason here."

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

python delete.py -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.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.