Manual:Pywikibot/capitalize redirects.py

This script can be used to create capitalization redirect (e.g. abc to ABC).

Examples

 * Check pages starting from A, if the capitalization redirect didn't exist, create one.

python capitalize_redirects.py -start:A -always

Arguments

 * -always          Don't prompt to make changes, just do them.
 * -titlecase       creates a titlecased redirect version of a given page where all words of the title start with an uppercase character and the remaining characters are lowercase.

Example:


 * python pwb.py capitalize_redirects -start:B -always

Usage output
Usage is reported thus;

Global arguments available for all bots: -lang:xx         Set the language of the wiki you want to work on, overriding the configuration in user-config.py. xx should be the language code. -family:xyz      Set the family of the wiki you want to work on, e.g.                   wikipedia, wiktionary, wikitravel, ...                   This will override the configuration in user-config.py. -log             Enable the logfile. Logs will be stored in the logs subdirectory. -log:xyz         Enable the logfile, using xyz as the filename. -nolog           Disable the logfile (if it is enabled by default). -putthrottle:nn  Set the minimum time (in seconds) the bot will wait between saving pages. Bot to create capitalized redirects.

It creates redirects where the first character of the first word is uppercase and the remaining characters and words are lowercase.