Module:Maintenance data

-- --- Returns the static maintenance data. --- Used by Template:Current maintenance data --- Syntax: or

local p        = {} local lib      = require('Module:Feature') local userError = require('Dev:User error') local keyword  = mw.loadData('Module:Maintenance data/data')

--% Entry point to use module --@ frame (table) A scribunto frame --: (string) The return content of the keyword or "N/A" function p.main(frame) local args; if frame.args == nil then args = lib.arguments(frame) else args = lib.arguments(frame.args) end local s = keyword[args[1]] if s == nil then return userError("Unrecognized parameter: " .. args[1] .. "", "LuaError") end if type(s) == "table" then return s[tonumber(args[2])] else return s   end end

return p -- --