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

local s = "%1 station" local u = "%1"

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

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

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

["d1"] = "Creil", ["d2"] = "Melun", ["d3"] = "Gare de Lyon", ["d4"] = "Malesherbes", ["d6"] = "Corbeil-Essonnes", ["d7"] = "Goussainville", ["e2"] = "Chelles-Gournay", ["e4"] = "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"] = "RER", ["system icon"] = "", ["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", ["Luxembourg"] = "Luxembourg", ["Nation"] = "Nation", ["Pont de Rungis"] = "Pont de Rungis – Orly", ["Pont du Garigliano"] = "Pont du Garigliano–Hôpital européen Georges-Pompidou", ["Porte de Clichy"] = "Porte de Clichy", ["Rosa Parks"] = "Rosa Parks", ["Saint-Quentin-en-Yvelines"] = "Saint-Quentin-en-Yvelines", ["St-Michel – Notre-Dame"] = "Saint-Michel–Notre-Dame", ["Versailles RG"] = "Versailles RG", ["Villiers-sur-Marne"] = "Villiers-sur-Marne", },	["lines"] = { ["_default"] = { ["title"] = "RER %1", ["color"] = "ffffff" },		["A"] = { ["icon"] = "", ["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"] = "", ["color"] = "5291CE", ["left terminus"] = { "Aéroport Charles de Gaulle 2 TGV", "Mitry–Claye"}, ["right terminus"] = { "Robinson", "Saint-Rémy-lès-Chevreuse"} },		["C"] = { ["icon"] = "", ["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"] = "", ["color"] = "00814F", ["left terminus"] = "Creil", ["right terminus"] = { "Melun", "Malesherbes" }		},		["E"] = { ["icon"] = "", ["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