Module:Sandbox/User:Alsang: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3:
function p.main()
local query = '[[Category:Hammermage Equipment]] ORAND [[Category:GuardianVariant Equipment]] OR [[Categorytype:Cryoknight Equipment:~*]]|?#-=name|limit=500'
local results = mw.smw.ask(query)
local out = mw.html.create('table')
:addClass('wikitable sortable')
for _,page in ipairs(results) do
out:wikitexttag(page.name'tr')
:tag('th')
out:wikitext(mw.getCurrentFrame():preprocess('{{ItemSources|' .. page.name .. '}}'))
:wikitext('[[' .. page.name .. ']]')
:done()
:tag('td')
:wikitext('[[' .. page.name .. ' (basic)]]')
:done()
:tag('td')
:wikitext('[[' .. page.name .. ' (moderate)]]')
:done()
:tag('td')
:wikitext('[[' .. page.name .. ' (fine)]]')
:done()
:tag('td')
:wikitext('[[' .. page.name .. ' (strong)]]')
:done()
:tag('td')
:wikitext('[[' .. page.name .. ' (superior)]]')
:done()
:tag('td')
:wikitext('[[' .. page.name .. ' (perfect)]]')
:done()
:done()
end
20,856

edits