User:GeertivpBot/Pywikibot/Scripts/copy label.py

copy_label.py is a bot to correct and augment data on Wikidata, Wikimedia Commons, and Wikipedia.

Extremely easy to use. It is not overwriting existing data, not creating duplicates.

Metadata

edit

It is using Wikidata to:

  • process symmetric and reciproque properties;
  • add language labels
  • add commons categories
  • obtain the local language labels of templates.

It is processing Wikimedia Commons to:

  • add {{Wikidata Infobox}} to Commons Category pages
  • add structured data (depict statements)

It is processing Wikipedia to:

  • add sitelinks
  • add infoboxes
  • add pictures
  • add authority control
  • add categories

Usage

edit
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 are ignored.

Code

edit