User:Saroj/CatSync
CatSync is a gadget that lets you copy categories from a matching article on another Wikimedia project into the current article, matched via Wikidata sitelinks.
The script adds a "Sync categories" button to the page actions menu. Selecting a source project and language fetches that article's categories, matches each one to its Wikidata item, and checks whether an equivalent category exists on the current wiki. You then get a preview of the new categories with checkboxes, so you can review and select exactly which ones to insert before saving.
CatSync only runs on Wikipedia and Wikiquote articles; it will not appear on other projects. The source project defaults to Wikipedia, since it generally has the most complete categorization.
Import
[edit]To import CatSync, add the following JavaScript to your global.js:
mw.loader.load('//meta.wikimedia.org/w/index.php?title=User:Saroj/CatSync.js&action=raw&ctype=text/javascript'); // Backlink: [[User:Saroj/CatSync.js]]
Usage
[edit]- Open any mainspace article on Wikipedia or Wikiquote.
- Click Sync categories in the page actions menu.
- Choose the source project and language (defaults to Wikipedia, English).
- Click Sync to fetch and match categories.
- In the preview, review the categories found and uncheck any you don't want.
- Click Insert to add the selected categories to the article.