Categories scripts#
category_redirect script#
This bot 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.
The following parameters are supported:
-always If used, the bot won't ask if it should add the specified
text
-delay:# Set an amount of days. If the category is edited more recenty
than given days, ignore it. Default is 7.
-tiny Only loops over Category:Non-empty_category_redirects and
moves all images, pages and categories in redirect categories
to the target category.
Usage:
python pwb.py category_redirect [options]
Note
This script is a
ConfigParserBot
. All options
can be set within a settings file which is scripts.ini by default.
commonscat script#
With this tool you can add the template {{commonscat}} to categories
The tool works by following the interwiki links. If the template is present on another language page, the bot will use it.
You could probably use it at articles as well, but this isn’t tested.
The following parameters are supported:
-checkcurrent Work on all category pages that use the primary commonscat
template.
This script is a ConfigParserBot
.
The following options can be set within a settings file which is scripts.ini
by default::
-always Don't prompt you for each replacement. Warning message
has not to be confirmed. ATTENTION: Use this with care!
-summary:XYZ Set the action summary message for the edit to XYZ,
otherwise it uses messages from add_text.py as default.
This bot uses pagegenerators to get a list of pages. The following options are supported:
This script supports use of pagegenerators
arguments.
For example to go through all categories:
python pwb.py commonscat -start:Category:!