Manual:Pywikibot/commons category redirect.py
This bot cleans Commons:Category:Non-empty category redirects by moving all the files, pages and categories from redirected category, which were not edited for at least a week, to the target category.
The bot will look for categories that are marked with a category redirect template, take the first parameter of the template as the target of the redirect, and move all pages and subcategories of the category there. Only category pages that haven't been edited for a certain cooldown period (currently 7 days) are taken into account, to prevent edit wars and vandalism.
No bot-specific parameters.
Global arguments available for all bots
These options will override the configuration in user-config.py settings.
|-dir:PATH||Read the bot's configuration data from directory given by PATH, instead of from the default directory.|
|-lang:xx||Set the language of the wiki you want to work on. xx should be the language code.||
|-family:xyz||Set the family of the wiki you want to work on, e.g. wikipedia, wiktionary, commons, wikitravel, ….||
|-user:xyz||Log in as user 'xyz' instead of the default username.|
|-daemonize:xyz||Immediately return control to the terminal and redirect stdout and stderr to xyz (only use for bots that require no input from stdin).|
|-help||Show a help text for the invoked script.|
|-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's enabled by default).|
|-maxlag||Sets a new maxlag parameter to a number of seconds. Defer bot edits during periods of database server lag.||
|Enable the logfile and include extensive debugging data for component "item" (for all components if the second form is used).|
|Set the minimum time (in seconds) the bot will wait between saving pages.||
|Make the program output more detailed messages than usual to the standard output about its current work, or progress, while it is proceeding. This may be helpful when debugging or dealing with unusual situations.||not selected|
|Toggles the cosmetic_changes setting made in config.py or user_config.py to its inverse and overrules it. All other settings and restrictions are untouched.||not selected|
|-simulate||Disables writing to the server. Useful for testing and debugging of new code (if given, doesn't do any real changes, but only shows what would have been changed).|
|-<config_var>:n||You may use all given numeric config variables as option and modify it with command line.
For instance, the