local p = {}
function p.id( frame )
local pframe = frame:getParent()
local config = frame.args
local args = pframe.args
local system = frame.args[1]
local code = frame.args[2]
if not system or not code then
return 'error'
end
local data = require('Module:HK-MTR_stations/' .. system)
local station = data.stations[code]
return code .. ' ' .. station.id
end
function p.link( frame )
local pframe = frame:getParent()
local config = frame.args
local args = pframe.args
local system = frame.args[1]
local code = frame.args[2]
if not system or not code then
return 'error'
end
local data = require('Module:HK-MTR_stations/' .. system)
local station = data.stations[code]
return code .. ' ' .. station.link
end
return p