User:Shushugah/DiplomacyDocumentation

Diplomatic templates
If you are reading this, you probably found this link at the talk page of one of the templates. If you see any bugs, have questions, feel free to raise a question on the talk page of this page, or on my main User_talk page.

Example Templates created using this script

 * Template:Diplomatic missions in Peru
 * Template:Diplomatic missions of Algeria

How can I help?

 * If you see any bugs, have questions, feel free to raise a question on the talk page of this page, or on my main User_talk page
 * These templates are mostly useful if people can see them, and if they have links to English Wikipedia articles and wiki articles from other language Wikipedias.
 * To find all embassies in one country, for example Burundi click on the following Wikidata SPARQL query. Click through all results to see if there are Wikipedia articles in any language. If you want another country, you'll need to edit it (click on "Edit Visually" and enter the country name, OR "Edit SPARQL" and replace wd:Q967 with whatever country you want. (Credit to User:Finnusertop for this tip).


 * To find all the embassies and consular services associated with one country (but located elsewhere) you can use this SPARQL query


 * To find just consulates which have at least one Wikipedia article associated with them see

Embassy naming convention
Break all rules applies here as well. Below are some case examples of different naming conventions


 * Default/most common: Embassy of Iran, Moscow. The City name is important, because sometimes an embassy moves locations and there are two separate articles.
 * Holy See Missions to the Holy See are a little different. Following is an example Apostolic Nunciature to Ireland, can also be a delegation, e.g. Apostolic Delegation to the Antilles
 * Common wealth nations often refer to their missions as High Commission, e.g. High Commission of India, Islamabad
 * Custom names, for example in Luxembourg castles are common embassy locations, such as Dommeldange Castle. A redirect can be useful for searchability, e.g. Embassy of China, Luxembourg City.

The script
Locally I have ruby installed (every Mac machine has it by default), which I use to open multiple browser windows at a time, by calling

the first 5 Template previews and their associated talk pages. The real magic happens inside the templates that are preloaded. You can see the three preloaded templates I created:


 * 1) For talk pages User:Shushugah/IRTalk
 * 2) For Diplomatic missions in Country X User:Shushugah/Diplomatic_Missions_In_X
 * 3) For Diplomatic missions of Country X User:Shushugah/Diplomatic_Missions_Of_X