Manual:Pywikibot/redirect.py

In other languages: en - fr - it - ja

Script which fixes double redirects, and deletes broken redirects.

Requires access to MediaWiki's maintenance pages or to a XML dump file. Delete function requires adminship.

Syntax:

python redirect.py action [-argument]

where action can be one of these:


 * double - fix redirects which point to other redirects
 * broken - delete redirects where targets don't exist. Requires adminship.

and argument can be:


 * xml:filename.xml - Retrieve information from a local XML dump (http://download.wikimedia.org). If this argument isn't given, info will be loaded from a special page of the live wiki.
 * namespace:n - Namespace to process. Works only with an XML dump.
 * offset:n - Number of redirect to restart with (see progress). Works only with an XML dump or with -moves.
 * moves - Instead of using Special:Doubleredirects, use the page move log to find double-redirect candidates (only works with action "double", does not work with -xml)
 * always - Don't prompt you for each replacement.