Manual:Pywikibot/template.py

In other languages: en - ja

This pyWikipedia bot script replaces a template with another, and converts the old MediaWiki boilerplate format to the new template format.

Usage

 * Syntax:
 * Example:

Specify the template on the command line. The program will pick up the template page, and look for all pages using it. It will then automatically loop over them, and replace the template.

Command line options

 * -always:
 * -extras:
 * -namespace:
 * -page:
 * -remove: Remove every occurence of the template from every article
 * -summary: Edit summary
 * -xml: retrieve information from a local sql-dump which contains the page titles (http://download.wikimedia.org, table page). If this argument is not given, info will be loaded from the maintenance page of the live wiki. Argument can also be given as "-xml:filename.xml".
 * oldTemplate: old template name
 * newTemplate: new template name. If only one argument is given, the bot resolves the template by putting its text directly into the article. This is done by changing or  into  . If you want to address a template which has spaces, put quotation marks around it.