Manual:Pywikibot/category redirect.py

From MediaWiki.org
Jump to: navigation, search
Wikimedia-logo-meta.png

This page was moved from MetaWiki.
It probably requires cleanup – please feel free to help out. In addition, some links on the page may be red; respective pages might be found at Meta. Remove this template once cleanup is complete.

Bug blank.svg
Git repository of Wikimedia has this file:
Pwb icon.svg
Pywikibot
scripts
Quick overview
Quick Start Guide
Installation (Mac)
user_config.py

Wikidata
Non-Wikimedia wikis
Basic use
Scripts
Development
Further help

v  d  e

category_redirect.py will move pages out of redirected categories.

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. It also changes hard redirects into soft redirects, and fixes double redirects. A log is written under <userpage>/category_redirect_log. Only category pages that haven't been edited for a certain cooldown period (currently 7 days) are taken into account.

Parameters[edit | edit source]

No bot-specific parameters.

Global arguments available for all bots

arg Description Default compat core
-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 user-config.py. xx should be the language code. user-config.py parameter: mylang
-family:xyz Set the family of the wiki you want to work on, e.g. wikipedia, wiktionary, commons, wikitravel, …. This will override the configuration in user-config.py settings. user-config.py parameter: family
-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. user-config.py parameter: log ?
-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. Default is set by config.py
-debug:item
-debug
Enable the logfile and include extensive debugging data for component "item" (for all components if the second form is used).
-putthrottle:nn
-pt:nn
Set the minimum time (in seconds) the bot will wait between saving pages. user-config.py parameter: put_throttle
-verbose
-v
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