Module:Sandbox/ChaoticShadow/Song

local getArgs = require('Module:Arguments').getArgs local p = {}

local builder = require('Module:Sandbox/ChaoticShadow/InfoboxBuilder')

local function youtube(arg) return mw.getCurrentFrame:callParserFunction({		name = '#tag',		args = { 'youtube', arg }	}) end

local tbl = { ['q'] = 'b', ['w'] = 'n', ['e'] = 'm', }

local function tbl2(arg) return tbl[arg] end

local function imageimage(arg) return string.format("", arg) end

function p.main(frame) -- local args = getArgs(frame) local args = frame:getParent.args local infobox = builder.new; infobox:setName('bob') infobox:setParams{ { name = 'test1', func = '', default = 'ok' }, { name = 'test2', func = '', default = 'not ok' }, { name = 'test3', func = youtube }, { name = 'test4', func = tbl2 }, { name = 'test5', func = tbl }, { name = 'image1', func = imageimage, default = 'NewLogo.png' }, { name = 'swimage1', func = imageimage }, { name = 'swimage2', func = imageimage }, { name = 'swimage3', func = imageimage } }	infobox:setArgs(args) -- return infobox:getContent({ content = 'test1' }) infobox :setHeaderBackgroundColor('#ff70a8') :setWidth('300px') :addRow{ { tag = 'th', content = 'Test' }, { tag = 'argtd', content = 'test1' } }		:addRow{ { tag = 'th', content = 'Test2' }, { tag = 'argtd', content = 'test2' } }		:addRow{ { tag = 'argtd', content = 'test3' } }		:addHeader{ content = 'This is a Header' }		:addHeader{ content = 'This is also a header', css = { ['background-color'] = "lightblue" }		}		:addRow{ { tag = 'th', content = 'Test4' }, { tag = 'argtd', content = 'test4', css = { ['font-weight'] = 'bold', ['font-style'] = 'italic' }},			{ tag = 'th', content = 'Test5' }, { tag = 'argtd', content = 'test5' } }		:addImage{ { content = 'image1' } }		:addImage{ { tag = 'argtd', content = 'swimage1', title = 'ONe' }, { content = 'swimage2', title = 'Two' } }		:addImage{ { tag = 'argtd', content = 'swimage1', title = 'ONe' }, { tag = 'argtd', content = 'swimage2', title = 'Two' } }		:addImage{ { tag = 'argtd', content = 'swimage1', title = 'ONe' }, { tag = 'argtd', content = 'swimage3', title = 'THREE' } }		:addLinks return ' ' .. mw.dumpObject(frame.args) .. ' '		..		' '.. mw.dumpObject(infobox) .. ' ' 		..		infobox:tostring -- local t = frame:callParserFunction{ name = 'ns', args = -2 } -- local t2 = frame:callParserFunction{ name = 'ns', args = 2 } -- local root = mw.html.create('div') -- root:wikitext(frame:callParserFunction({ -- 	name = '#tag', -- 	args = { 'youtube', 'dy90tA3TT1c' } -- }))	-- return frame:callParserFunction({	-- 	name = '#tag',	-- 	args = { 'youtube', 'dy90tA3TT1c' }	-- }) -- return frame:callParserFunction({	-- 	name = '#tag',	-- 	args = {'tabber', 'A=Test|-|B=Test2' }	-- }) -- return tostring(root) --return t .. t2 end

return p