Modul:Kották metaadatainak tesztje

Kották metaadatainak tesztje[mi ez?] • [dokumentáció: mutat, szerkeszt] • [tesztek: létrehozás]

Kiírja a kottás lapokat és a Dal infoboxban található metaadataikat. Így kell hívni:

{{#invoke:Kották metaadatainak tesztje|proba}}

Paramétere nincs. Az adatokat a Modul:Kották metaadatai-ból veszi. A modul kimenete a Sablon:Kották metaadatainak tesztje lapon található.

local p = {}

function p.proba(frame)
	tomb = mw.loadData( "Module:Kották metaadatai" )
	local offset = tonumber(frame.args[1]) or 0
	local ret = ''
	local c = 0
	for i, t in pairs(tomb)
	do	c = c + 1
		if c > offset + 400
		then	break
		end
		if c > offset
		then	ret = ret .. '\n' .. i
			for j, u in pairs(t)
			do	if u ~= ''
				then	ret = ret .. '\n* ' .. j .. ' = ' .. u
				end
			end
		end
	end
	
	return ret
end

return p