Module:Adjacent stations/Swiss Federal Railways

local ch = "%1 railway station (Switzerland)" local hbf = "%1 Hbf"

local r = { ["title"] = "Regio", ["icon"] = "", }

local re = { ["title"] = "RegioExpress", ["icon"] = "", }

local p = { ["system title"] = "Swiss Federal Railways", ["system icon"] = "", ["system color"] = "ff0000", ["station format"] = { "%1 railway station", ["Altdorf"] = ch, ["Biel/Bienne Bözingenfeld/Champ"] = "Biel/Bienne Bözingenfeld/&#8203;Champ", ["Frankfurt (Main)"] = hbf, ["Graz"] = hbf, ["Meroux TGV"] = "Belfort – Montbéliard TGV station", ["München"] = hbf, ["Rheinfelden"] = ch, ["Sion"] = ch, ["Stuttgart"] = hbf, ["Zürich"] = "Zürich Hauptbahnhof", ["Zürich Hauptbahnhof"] = "%1", },	["name format"] = "font-size:160%; font-family:Helvetica; font-weight:bolder; font-kerning:auto; font-stretch:expanded; color:#FFFFFF; background-color:#0E3984; padding:0.5em 4px; text-align:center; align-items:center;", ["header background color"] = "EB1A00", ["header text color"] = "FFFFFF", ["lines"] = { ["_default"] = { ["color"] = "ff0000", },		-- InterCity services ["IC 1"] = { ["title"] = "IC 1", ["color"] = "e43d2e", ["left terminus"] = "Geneva Airport", ["right terminus"] = "St. Gallen", ["icon"] = "", },		["IC 2"] = { ["title"] = "IC 2", ["color"] = "8781bd", ["left terminus"] = "Zürich Hauptbahnhof", ["right terminus"] = "Lugano", ["icon"] = "", },		["IC 3"] = { ["title"] = "IC 3", ["color"] = "00984a", ["left terminus"] = "Basel SBB", ["right terminus"] = "Chur", ["icon"] = "", },		-- At least for 2023 the IC 4 lost its number ["IC 4"] = { ["title"] = "IC", ["color"] = "c9a527", ["left terminus"] = "Zürich Hauptbahnhof", ["right terminus"] = "Stuttgart", ["icon"] = "", },		["IC 5"] = { ["title"] = "IC 5", ["color"] = "f7941d", ["left terminus"] = {"Geneva Airport", "Lausanne"}, ["right terminus"] = "Rorschach", ["icon"] = "", ["types"] = { ["Geneva Airport"] = { ["title"] = "", ["left terminus"] = "Geneva Airport", ["right terminus"] = "Rorschach", },				["Lausanne"] = { ["title"] = "", ["left terminus"] = "Lausanne", ["right terminus"] = "Zürich Hauptbahnhof", },			}		},		["IC 6"] = { ["title"] = "IC 6", ["color"] = "8dc63f", ["left terminus"] = "Basel SBB", ["right terminus"] = "Brig", ["icon"] = "", },		["IC 8"] = { ["title"] = "IC 8", ["color"] = "009bdf", ["left terminus"] = "Brig", ["right terminus"] = "Romanshorn", ["icon"] = "", },		["IC 21"] = { ["title"] = "IC 21", ["color"] = "ffc80b", ["text color"] = "000000", ["left terminus"] = "Basel SBB", ["right terminus"] = "Lugano", ["icon"] = "", },		["IC 51"] = { ["title"] = "IC 51", ["color"] = "b01116", ["left terminus"] = "Biel/Bienne", ["right terminus"] = "Basel SBB", ["icon"] = "", },		["IC 61"] = { ["title"] = "IC 61", ["color"] = "ef59a1", ["left terminus"] = "Basel SBB", ["right terminus"] = "Interlaken Ost", ["icon"] = "", },		["IC 81"] = { ["title"] = "IC 81", ["color"] = "6aa2bb", ["left terminus"] = "Interlaken Ost", ["right terminus"] = "Romanshorn", ["icon"] = "", },		-- IR (InterRegio) ["IR 13"] = { ["title"] = "IR 13", ["color"] = "2caeb3", ["text color"] = "000000", ["left terminus"] = "Zürich Hauptbahnhof", ["right terminus"] = "Chur", ["icon"] = "", },		["IR 15"] = { ["title"] = "IR 15", ["color"] = "11b895", ["left terminus"] = "Geneva Airport", ["right terminus"] = "Lucerne", ["icon"] = "", },		["IR 16"] = { ["title"] = "IR 16", ["color"] = "a07032", ["left terminus"] = "Bern", ["right terminus"] = "Zürich Hauptbahnhof", ["icon"] = "", },		["IR 26"] = { ["title"] = "IR 26", ["color"] = "af8889", ["left terminus"] = "Basel SBB", ["right terminus"] = "Airolo", ["icon"] = "", },		["IR 27"] = { ["title"] = "IR 27", ["color"] = "5b6e25", ["left terminus"] = "Basel SBB", ["right terminus"] = "Lucerne", ["icon"] = "", },		["IR 36"] = { ["title"] = "IR 36", ["color"] = "ad227a", ["left terminus"] = "Basel SBB", ["right terminus"] = "Zürich Airport", ["icon"] = "", },		["IR 37"] = { ["title"] = "IR 37", ["color"] = "b8da89", ["text color"] = "000000", ["left terminus"] = "Basel SBB", ["right terminus"] = "Zürich Hauptbahnhof", ["icon"] = "", },		["IR 70"] = { ["title"] = "IR 70", ["color"] = "f391bc", ["text color"] = "000000", ["left terminus"] = "Lucerne", ["right terminus"] = "Zürich Hauptbahnhof", ["icon"] = "", },		["IR 75"] = { ["title"] = "IR 75", ["color"] = "754c98", ["left terminus"] = "Lucerne", ["right terminus"] = "Konstanz", ["icon"] = "", },		["IR 90"] = { ["title"] = "IR 90", ["color"] = "007ca3", ["left terminus"] = "Geneva Airport", ["right terminus"] = "Brig", ["icon"] = "", },		["Brig–Domodossola"] = { ["title"] = "IR", ["left terminus"] = "Brig", ["right terminus"] = "Domodossola", ["icon"] = "", },

-- R (Regio) ["R13"] = { ["title"] = "R13", ["note-mid"] = "Limited service", ["color"] = "978ac2", ["icon"] = r.icon, ["left terminus"] = "Yverdon-les-Bains", ["right terminus"] = "Neuchâtel", },		["R14"] = { ["title"] = "R14", ["color"] = "893192", ["icon"] = r.icon, ["left terminus"] = "Gorgier-St-Aubin", ["right terminus"] = "Neuchâtel", },		["R16"] = { ["title"] = "R16", ["color"] = "68ae43", ["icon"] = r.icon, ["left terminus"] = "Neuchâtel", ["right terminus"] = "Biel/Bienne", },		["R20"] = { ["title"] = "R20", ["color"] = "eed220", ["icon"] = r.icon, ["left terminus"] = "Le Locle", ["right terminus"] = "La Chaux-de-Fonds", },		["R23"] = { ["title"] = "R23", ["color"] = "8496ac", ["icon"] = r.icon, ["left terminus"] = "Corcelles-Peseux", ["right terminus"] = "Neuchâtel", },		["R41"] = { ["title"] = "R41", ["color"] = "5c1288", ["icon"] = r.icon, ["left terminus"] = {"La Chaux-de-Fonds", "Moutier"}, ["right terminus"] = "Biel/Bienne", ["types"] = { ["La Chaux-de-Fonds"] = { ["title"] = "", ["left terminus"] = "La Chaux-de-Fonds", },				["Moutier"] = { ["title"] = "", ["left terminus"] = "Moutier", },			},		},

-- RE (RegioExpress) ["RE4"] = { ["title"] = "RE4", ["color"] = "90b6e4", ["icon"] = re.icon, ["left terminus"] = "La Chaux-de-Fonds", ["right terminus"] = "Biel/Bienne", },		["RE6 (NE)"] = { ["title"] = "RE6", ["short name"] = "RE6", ["color"] = "9d8a72", ["icon"] = re.icon, ["left terminus"] = "Le Locle", ["right terminus"] = "Neuchâtel", },		["RE6 (AR)"] = { ["title"] = "RE6", ["note-mid"] = "Limited service", ["short name"] = "RE6", ["icon"] = re.icon, ["left terminus"] = "Olten", ["right terminus"] = "Arth-Goldau", },		["RE9"] = { ["title"] = "RE9", ["color"] = "ce579f", ["icon"] = re.icon, ["left terminus"] = "Frasne", ["right terminus"] = "Neuchâtel", },		["RE12"] = { ["title"] = "RE12", ["icon"] = re.icon, ["left terminus"] = "Olten", ["right terminus"] = "Wettingen", },		["RE24"] = { ["title"] = "RE24", ["icon"] = re.icon, ["left terminus"] = "Olten", ["right terminus"] = "Lucerne", },		["RE33"] = { ["title"] = "RE33", ["color"] = "652400", ["icon"] = re.icon, ["left terminus"] = {"Annemasse", "Geneva Airport"}, ["right terminus"] = "St-Maurice", ["types"] = { ["Annemasse"] = { ["title"] = "", ["left terminus"] = "St-Maurice", ["right terminus"] = "Annemasse", },			},		},		["RE37"] = { ["title"] = "RE37", ["icon"] = re.icon, ["left terminus"] = "Aarau", ["right terminus"] = "Zürich Hauptbahnhof", },		["RE48"] = { ["title"] = "RE48", ["icon"] = re.icon, ["left terminus"] = "Zürich Hauptbahnhof", ["right terminus"] = "Schaffhausen", },		["RE56"] = { ["title"] = "RE56", ["icon"] = re.icon, ["left terminus"] = "Meroux TGV", ["right terminus"] = "Biel/Bienne", },		["RE Renens–St-Maurice"] = { ["title"] = re.title, ["icon"] = re.icon, ["left terminus"] = "Renens VD", ["right terminus"] = "St-Maurice", ["note-mid"] = "Limited service", },

-- S-bahn lines in Solothurn ["S20"] = { ["title"] = "S20", ["color"] = "ec008c", ["text color"] = "FFFFFF", ["left terminus"] = {"Biel/Bienne", "Oberdorf SO"}, ["right terminus"] = "Olten", },		["S21"] = { ["title"] = "S21", ["color"] = "93725f", ["text color"] = "FFFFFF", ["left terminus"] = "Moutier", ["right terminus"] = "Solothurn", },		["S22"] = { ["title"] = "S22", ["color"] = "3b6199", ["text color"] = "FFFFFF", ["left terminus"] = "Oensingen", ["right terminus"] = "Balsthal", },		-- Seasonal service ["Verbier Express"] = { ["title"] = "Verbier Express", ["left terminus"] = "Annemasse", ["right terminus"] = "Le Châble", },		["VosAlpes Express"] = { ["title"] = "VosAlpes Express", ["left terminus"] = "Fribourg/Freiburg", ["right terminus"] = "Le Châble", },			-- Disambiguation entries ["RE6"] = { ["title"] = "RE6", ["color"] = "999999", }	},	["aliases"] = { ["r le locle–la chaux-de-fonds"] = "R20", ["r la chaux-de-fonds/moutier–biel/bienne"] = "R41", ["re la chaux-de-fonds–biel/bienne"] = "RE4", } }

-- Import EuroCity services local ec = require('Module:Adjacent stations/EuroCity') local ec_lines = { "EC Basel-Milan", "EC Frankfurt-Milan", "EC Geneva-Milan", "EC Hamburg-Interlaken", "EC Hamburg-Zürich", "EC Zürich-Graz", "EC Zürich-Milan", "EC Zürich-München" } for k, v in pairs(ec_lines) do	p["lines"][v] = ec["lines"][v] p["lines"][v]["icon"] = "" end

return p