Module:Sandbox/User:Alsang: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
function p.main() |
function p.main() |
||
local query = '[[Category:Hammermage Equipment]] |
local query = '[[Category:Hammermage Equipment]] AND [[Variant type::~*]]|?#-=name|limit=500' |
||
local results = mw.smw.ask(query) |
local results = mw.smw.ask(query) |
||
local out = mw.html.create('table') |
local out = mw.html.create('table') |
||
:addClass('wikitable sortable') |
|||
for _,page in ipairs(results) do |
for _,page in ipairs(results) do |
||
out: |
out:tag('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 |
end |
||