Module:Placement

local p = {} local data = mw.loadData('Module:Placement/data') local getArgs = require('Module:Arguments').getArgs

function p.main(frame) local args = getArgs(frame, {   wrappers = {      'Template:Placement'    }  }) return p._main(args) end

function p._main(args) if args[1] then local entry = data[string.lower(args[1])] if entry then local text_color = entry[4] or 'black' local text = mw.html.create('span') :css('color', text_color) :css('font-weight', 'bold') :wikitext(entry[3]) return 'bgcolor="' .. entry[1] .. '" align=center | ' .. entry[2] .. ' ' .. tostring(text) else error('No data found in Module:Placement', 0) end else error('Check your input', 0) end end

return p