Manual:Pywikibot/create categories.py

Program to batch create categories.

The program expects a generator of page titles to be used as suffix for creating new categories with a different base.

Parameters
The following command line parameters are supported: -always        Don't ask, just do the edit.

-overwrite     (not implemented yet).

-parent        The name of the parent category.

-basename      The base to be used for the new category names.

Example
 python pwb.py create_categories \ -lang:commons \ -family:commons \ -links:User:Multichill/Wallonia \ -parent:"Cultural heritage monuments in Wallonia" \ -basename:"Cultural heritage monuments in" The page 'User:Multichill/Wallonia' on commons contains page links like, causing this script to create.