Module:Sandbox/User:Alsang
Jump to navigation
Jump to search
Module documentation
This documentation is transcluded from Module:Sandbox/User:Alsang/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:Sandbox/User:Alsang/doc. [edit]
Module:Sandbox/User:Alsang's function main is invoked by Template:Sandbox/User:Alsang.
Module:Sandbox/User:Alsang transcludes Template:ItemSources using frame:preprocess().
p = {}
function p.main()
local query = '[[Category:Hammermage Equipment]] OR [[Category:Guardian Equipment]] OR [[Category:Cryoknight Equipment]]|?#-=name|limit=500'
local results = mw.smw.ask(query)
local out = mw.html.create('table')
for _,page in ipairs(results) do
out:wikitext(page.name)
out:wikitext(mw.getCurrentFrame():preprocess('{{ItemSources|' .. page.name .. '}}'))
end
return out
end
return p