Module:DunImg

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

function p.main(frame) local args = getArgs(frame) return p._main(args) end

function p._main(args) local i = 0 local files = {} local text = nil local image = nil local size = args["size"] or 200 local pos = args["pos"] or nil

for key, arg in ipairs(args) do		i = i+1 text = 'text' .. i		if not args[2] then if args["text"] then table.insert(files, arg..".png|"..args["text"]) else table.insert(files, arg..".png") end else if args[text] then table.insert(files, arg..".png|"..args[text]) else table.insert(files, arg..".png") end end

end

if #files == 1 then

if not pos then pos = "none" end image = "\n" else if not pos then pos = "left" end image = mw.getCurrentFrame:preprocess("") end return image end return p