Jump to content

User:JJMC89 bot/config/InfoboxCoordinatesParametersMigrator

This user is a bot.
This bot is hosted on Toolforge.
This user has AutoWikiBrowser permissions on the English Wikipedia.
JJMC89 bot's page on GitHub
From Wikipedia, the free encyclopedia

JSON object configuration

[edit]
{
	"coordinatesSets": [
		{
			"initialReplacementTemplate": "subst:Infobox coord/sandbox",
			"parametersMap": {
				"lat_d": "lat_d",
				"lat_m": "lat_m",
				"lat_s": "lat_s",
				"lat_NS": "lat_NS",
				"long_d": "long_d",
				"long_m": "long_m",
				"long_s": "long_s",
				"long_EW": "long_EW",
				"type": "coord_type",
				"region": "region_code",
				"dim": "dim",
				"scale": "scale",
				"source": "source",
				"display": "display",
				"format": "format"
			},
			"replacementParameterNames": ["coordinates", "coords"]
		},
		{
			"initialReplacementTemplate": "subst:Infobox coord/sandbox",
			"parametersMap": {
				"lat_d": "range_lat_d",
				"lat_m": "range_lat_m",
				"lat_s": "range_lat_s",
				"lat_NS": "range_lat_NS",
				"long_d": "range_long_d",
				"long_m": "range_long_m",
				"long_s": "range_long_s",
				"long_EW": "range_long_EW",
				"type": "coord_type",
				"region": "region_code",
				"dim": "dim",
				"scale": "scale",
				"source": "source",
				"display": "display",
				"format": "format"
			},
			"replacementParameterNames": "range_coordinates"
		}
	],
	"template": "Example"
}
{
	"coordinatesSets": [
		{
			"initialReplacementTemplate": "subst:Geobox coor/sandbox",
			"parametersMap": {
				"1": ["latitude", "lat_degrees"],
				"2": "lat_minutes",
				"3": "lat_seconds",
				"4": "lat_direction",
				"5": ["longitude", "long_degrees"],
				"6": "long_minutes",
				"7": "long_seconds",
				"8": "long_direction",
				"9": "coord_parameters",
				"display": "coord_display",
				"format": "coord_format"
			},
			"replacementParameterNames": "coordinates"
		}
	],
	"template": "Example"
}

Notes

[edit]
  • All object values must be strings unless otherwise specified below.
  • coordinatesSets's value must be an array of objects.
    • Each object in the array must contain initialReplacementTemplate, parametersMap, and replacementParameterNames.
      • parametersMap's value must be an object with values that are strings or arrays of strings.
        • Names are parameter names for the template that is used to set the replacement parameter's value.
        • Values are parameter names from template.
      • replacementParameterNames's value can be a string or array of strings.
  • editSummary is optional. If null or not provided, the default edit summary will be used.
  • template must not include the namespace (Template:).
  • There are three different substitution templates for parameters to be mapped to:

List of configurations

[edit]