Jump to content

Module:Adjacent stations/Réseau Express Régional/sandbox

From Wikipedia, the free encyclopedia
local s = "%1 station"
local u = "%1"

local termini = {
	["a1"] = "[[Saint-Germain-en-Laye station|Saint-Germain-en-Laye]]",
	["a2"] = "[[Boissy-Saint-Léger station|Boissy-Saint-Léger]]",
	["a3"] = "[[Cergy-le-Haut station|Cergy-le-Haut]]",
	["a4"] = "[[Marne-la-Vallée–Chessy station|Marne-la-Vallée–Chessy]]",
	["a5"] = "[[Poissy station|Poissy]]",

	["b2"] = "[[Robinson (Paris RER)|Robinson]]",
	["b3"] = "[[Aéroport Charles de Gaulle 2 TGV]]",
	["b4"] = "[[Saint-Rémy-lès-Chevreuse station|Saint-Rémy-lès-Chevreuse]]",
	["b5"] = "[[Mitry–Claye station|Mitry–Claye]]",

	["c1"] = "[[Pontoise station|Pontoise]]",
	["c2"] = "[[Massy-Palaiseau station|Massy-Palaiseau]]",
	["c3"] = "[[Montigny – Beauchamp station|Montigny – Beauchamp]]",
	["c4"] = "[[Dourdan-la-Forêt station|Dourdan-la-Forêt]]",
	["c5"] = "[[Versailles-Château-Rive Gauche station|Versailles-Château–Rive Gauche]]",
	["c6"] = "[[Saint-Martin-d'Étampes (Paris RER)|Saint-Martin-d'Étampes]]",
	["c7"] = "[[Saint-Quentin-en-Yvelines–Montigny-le-Bretonneux station|Saint-Quentin-en-Yvelines]]",
	["c8"] = "[[Versailles-Chantiers station|Versailles-Chantiers]]",

	["d1"] = "[[Creil station|Creil]]",
	["d2"] = "[[Melun station|Melun]]",
	["d3"] = "[[Gare de Lyon]]",
	["d4"] = "[[Malesherbes (Paris RER)|Malesherbes]]",
	["d6"] = "[[Corbeil-Essonnes (Paris RER)|Corbeil-Essonnes]]",
	["d7"] = "[[Goussainville (Paris RER)|Goussainville]]",
	
	["e2"] = "[[Chelles–Gournay station|Chelles-Gournay]]",
	["e4"] = "[[Tournan station|Tournan]]"
}
local multitermini = {
	{"a3", "a5"}, 
	{"b2", "b4"}, 
	{"b3", "b5"}, 
	{"c2", "c4"}, 
	{"c4", "c6", "c8"}, 
	{"c5", "c7"}, 
	{"d2", "d4"}, 
	{"e2", "e4"}
}

for kk, slist in ipairs(multitermini) do
	local key = table.concat(slist)
	for k, v in ipairs(slist) do
		slist[k] = termini[v]
	end
	if #slist > 2 then
		termini[key] = table.concat(slist, ', ', 1, #slist - 1) .. ' or ' .. slist[#slist]
	else
		termini[key] = table.concat(slist, ' or ')
	end
end

local p = {
	["system title"] = "[[Réseau Express Régional|RER]]",
	["system icon"] = "[[File:Paris transit icons - RER.svg|16px|link=Réseau Express Régional|alt=RER]]",
	["station format"] = {
		"%1 (Paris RER)",
		-- station suffix
		["Achères–Grand-Cormier"] = s,
		["Achères-Ville"] = s,
		["Aulnay-sous-Bois"] = s,
		["Boissy-Saint-Léger"] = s,
		["Cergy-le-Haut"] = s,
		["Cergy-Préfecture"] = s,
		["Cergy-Saint-Christophe"] = s,
		["Cernay"] = s,
		["Chantilly-Gouvieux"] = s,
		["Champ de Mars–Tour Eiffel"] = s,
		["Chelles-Gournay"] = s,
		["Chelles–Gournay"] = s,
		["Conflans–Fin d'Oise"] = s,
		["Creil"] = s,
		["Dourdan-la-Forêt"] = s,
		["Émerainville–Pontault-Combault"] = s,
		["Ermont–Eaubonne"] = s,
		["Franconville – Le Plessis-Bouchard"] = s,
		["Gretz-Armainvilliers"] = s,
		["Houilles–Carrières-sur-Seine"] = s,
		["Issy–Val de Seine"] = s,
		["Javel"] = s,
		["Juvisy"] = s,
		["La Courneuve – Aubervilliers"] = s,
		["Le Blanc-Mesnil"] = s,
		["Les Boullereaux-Champigny"] = s,
		["Les Yvris–Noisy-le-Grand"] = s,
		["Magenta"] = s,
		["Maisons-Laffitte"] = s,
		["Marne-la-Vallée–Chessy"] = s,
		["Massy-Palaiseau"] = s,
		["Melun"] = s,
		["Mitry–Claye"] = s,
		["Montigny–Beauchamp"] = s,
		["Musée d'Orsay"] = s,
		["Nanterre-Préfecture"] = s,
		["Nanterre-Université"] = s,
		["Nanterre-Ville"] = s,
		["Neuville-Université"] = s,
		["Nogent–Le Perreux"] = s,
		["Orry-la-Ville-Coye"] = s,
		["Ozoir-la-Ferrière"] = s,
		["Pierrefitte–Stains"] = s,
		["Pierrelaye"] = s,
		["Poissy"] = s,
		["Pontoise"] = s,
		["Port-Royal"] = s,
		["Roissy-en-Brie"] = s,
		["Saint-Denis"] = s,
		["Saint-Germain-en-Laye"] = s,
		["Saint-Ouen-l'Aumône"] = s,
		["Saint-Ouen-l'Aumône-Liesse"] = s,
		["Saint-Rémy-lès-Chevreuse"] = s,
		["Sartrouville"] = s,
		["Sevran Beaudottes"] = s,
		["Sevran – Livry"] = s,
		["Sucy–Bonneuil"] = s,
		["Tournan"] = s,
		["Versailles-Chantiers"] = s,
		["Vert-Galant"] = s,
		["Villeparisis–Mitry-le-Neuf"] = s,
		["Villiers-sur-Marne–Le Plessis-Trévise"] = s,
		["Vincennes"] = s,
		-- no station suffix
		["Auber"] = "Gare d'%1",
		["Aéroport Charles de Gaulle 2 TGV"] = u,
		["Châtelet–Les Halles"] = u,
		["Charles de Gaulle–Étoile"] = u,
		["Gare d'Austerlitz"] = u,
		["Gare de Lyon"] = u,
		["Gare du Nord"] = u,
		["Haussmann–Saint-Lazare"] = u,
		["Saint-Michel–Notre-Dame"] = u,
		-- others
		["Bibliothèque François Mitterrand"] = "Bibliothèque François Mitterrand (Paris Métro and RER)",
		["Châtelet"] = "[[Châtelet–Les Halles]]",
		["Issy - Val de Seine"] = "[[Issy–Val de Seine station|Issy–Val de Seine]]",
		["Luxembourg"] = "[[Luxembourg station (Paris)|Luxembourg]]",
		["Nation"] = "[[Nation (Paris Métro and RER)|Nation]]",
		["Pont de Rungis"] = "[[Pont de Rungis – Aéroport d'Orly (Paris RER)|Pont de Rungis – Orly]]",
		["Pont du Garigliano"] = "[[Pont du Garigliano–Hôpital européen Georges-Pompidou station|Pont du Garigliano–Hôpital européen Georges-Pompidou]]",
		["Porte de Clichy"] = "[[Porte de Clichy (Paris Métro and RER)|Porte de Clichy]]",
		["Rosa Parks"] = "[[Rosa Parks station (Paris)|Rosa Parks]]",
		["Saint-Quentin-en-Yvelines"] = "[[Saint-Quentin-en-Yvelines–Montigny-le-Bretonneux station|Saint-Quentin-en-Yvelines]]",
		["St-Michel – Notre-Dame"] = "[[Saint-Michel–Notre-Dame]]",
		["Versailles RG"] = "[[Versailles-Château-Rive Gauche station|Versailles RG]]",
		["Villiers-sur-Marne"] = "[[Villiers-sur-Marne-Le Plessis-Trévise station|Villiers-sur-Marne]]",
	},
	["lines"] = {
		["_default"] = {
			["title"] = "[[RER %1]]",
			["color"] = "ffffff"
		},
		["A"] = {
			["icon"] = "[[File:Paris transit icons - RER A.svg|16px|link=RER A|alt=RER A]]",
			["color"] = "E3051C",
			["left terminus"] = {
				"Saint-Germain-en-Laye",
				"Cergy-le-Haut",
				"Poissy"},
			["right terminus"] = {
				"Boissy-Saint-Léger",
				"Marne-la-Vallée–Chessy"},
		},
		["B"] = {
			["icon"] = "[[File:Paris transit icons - RER B.svg|16px|link=RER B|alt=RER B]]",
			["color"] = "5291CE",
			["left terminus"] = {
				"Aéroport Charles de Gaulle 2 TGV",
				"Mitry–Claye"},
			["right terminus"] = {
				"Robinson",
				"Saint-Rémy-lès-Chevreuse"}
		},
		["C"] = {
			["icon"] = "[[File:Paris transit icons - RER C.svg|16px|link=RER C|alt=RER C]]",
			["color"] = "FFCE00",
			["left terminus"] = {
				"Pontoise",
				"Versailles RG",
				"Saint-Quentin-en-Yvelines"
			},
			["right terminus"] = {
				"Massy-Palaiseau",
				"Dourdan-la-Forêt",
				"Saint-Martin-d'Étampes",
				"Versailles-Chantiers"
			},
		},
		["D"] = {
			["icon"] = "[[File:Paris transit icons - RER D.svg|16px|link=RER D|alt=RER D]]",
			["color"] = "00814F",
			["left terminus"] = "Creil",
			["right terminus"] = {
				"Melun",
				"Malesherbes"
			}
		},
		["E"] = {
			["icon"] = "[[File:Paris transit icons - RER E.svg|16px|link=RER E|alt=RER E]]",
			["color"] = "C04191",
			["left terminus"] = "Haussmann–Saint-Lazare",
			["right terminus"] = {
				"Chelles–Gournay",
				"Tournan"}
		},
	},
	["aliases"] = {
		["a"] = "A",
		["rer a"] = "A",
		["b"] = "B",
		["rer b"] = "B",
		["c"] = "C",
		["rer c"] = "C",
		["d"] = "D",
		["rer d"] = "D",
		["e"] = "E",
		["rer e"] = "E",
	}
}

local function addtermini(stations, termini)
	for k,v in pairs(termini) do
		stations[k] = termini[k]
		stations[k:upper()] = termini[k]
	end
	return stations
end

p["station format"] = addtermini(p["station format"], termini)

return p