Manual:Pywikibot/illustrate wikidata.py

illustrate_wikidata.py is a  script used to add images to Wikidata items.

The image is extracted from the page_props page property.

For this to be available the  extension needs to be installed.

On Wikimedia wikis PageImages extension is installed.

Concept
Illustrate Wikidata bot uses the information from page_props to add a claim to Wikidata.

By default 1>:d:Property:P18|P18 (image) is used, but it's also possible to add other properties as long as the property is of type 2>:d:Category:Properties with commonsMedia-datatype|commonsMedia.

Usage
The bot expects a :

You can change the property to be added.

For example, to add 1>:d:Property:P41|P41 (flag image):