Manual:Pywikibot/commons category

Jump to: navigation, search

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.pyManual:Pywikibot/ settings.

Parameter Description Config variable
-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, overriding the configuration in <tvar ></>. <tvar
-family:xyz Set the family of the wiki you want to work on, e.g. wikipedia, wiktionary, wikitravel, ... This will override the configuration in <tvar ></>.
-user:xyz Log in as user '<tvar >xyz</>' instead of the default username.
-daemonize:xyz Immediately return control to the terminal and redirect stdout and stderr to file <tvar >xyz</>. (only use for bots that require no input from stdin).
-help Show the help text.
-log Enable the log file, using the default filename 'script_name<tvar >-bot.log</>' Logs will be stored in the logs subdirectory.
-log:xyz Enable the log file, using '<tvar >xyz</>' as the filename.
-nolog Disable the log file (if it is enabled by default).
-maxlag Sets a new maxlag parameter to a number of seconds. Defer bot edits during periods of database server lag. Default is set by maxlag
Set the minimum time (in seconds) the bot will wait between saving pages. put_throttle
Enable the log file and include extensive debugging data for component "item" (for all components if the second form is used). debug_log
Have the bot provide additional console output that may be useful in debugging. verbose_output
Toggles the <tvar >cosmetic_changes</> setting made in <tvar
-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). simulate
-<config var>:n You may use all given numeric config variables as option and modify it with command line.