User:GeertivpBot/Pywikibot/Scripts/copy label.py
copy_label.py is a bot script to amend data on Wikidata, Wikimedia Commons, and Wikipedia.
It is using the 3 platforms to interconnect objects and pages amongst the platforms, and perform data quality cleanup and reporting.
Extremely easy to use. It is not overwriting existing data, nor creating duplicates.
It requires a bot flag to execute.
Metadata
[edit]Wikidata
[edit]- process symmetric and reciproque (inverse) properties;
- add language labels (e.g. mul-label for persons);
- add commons categories;
- obtain the local language labels of templates to insert language specific Wikipedia infoboxes.
Wikimedia Commons
[edit]- add {{Wikidata Infobox}} to Commons Category pages;
- add structured data (depict statements).
Wikipedia
[edit]- add sitelinks;
- add infoboxes;
- add pictures;
- add authority control;
- add categories.
Usage
[edit]The script is repeatedly requesting a list of item numbers, using a regex expression.
pwb copy_label
Parameters
[edit]P1: source language code (default: LANGUAGE, LC_ALL, LANG environment variables)
P2... additional language codes for site-link check and label replication
Take care to only process Western (Roman) languages.
stdin: list of Q-numbers to process (extracted via regular expression);
duplicate and incompatible instances (e.g. subclass) are ignored.
Tips and tricks
[edit]- Register father, mother, sibling, ... at the child item page
- Then run the script to e.g. register the inverse statement "child" at the parent Qid
- You can use other tools to get a list of Q-numbers