Manual:Pywikibot/category.py

Syntax
The syntax is:

python pwb.py category action [-option]

where action can be one of the following.

and option can be one of the following.

Options for action
For this action, page generator options are supported.

Options for action
* -overwrite  - This overwrites the current page with the list even if something is already there. * -showimages - This displays images rather than linking them in the list. * -talkpages  - This outputs the links to talk pages of the pages to be listified in addition to the pages themselves.

Options for action
* -nodelsum   - This specifies not to use the custom edit summary as the deletion reason. Instead, it uses the default deletion reason for the language, which is " Category was disbanded " in English.

Options for several actions
NOTES:

For options -from and -to: If the category names have spaces in them you may need to use a special syntax in your shell so that the names aren't treated as separate parameters. For instance, in BASH, use single quotes, e.g.. For categories containing a colon you must explicitly prepend the namespace prefix or its localized equivalent.

For actions tidy and tree, the bot will store the category structure locally in. This saves time and server load, but if it uses these data later, they may be outdated; use the parameter in this case. For example, to create a new category from a list of persons, type:

python pwb.py category add -person

and follow the on-screen instructions.

Or to do it all from the command-line, use the following syntax:

python pwb.py category move -from:US -to:"United States"

This will move all pages in the category US to the category United States.