Module:Sandbox/User:Alsang: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 48:
out:tag('tr')
:tag('th')
:attr{ rowspan = '2' }
:wikitext('[[' .. page.name .. ']]')
:done()
:tag('td')
:wikitext('[[File:' .. page.name .. '.png]]')
:done()
:tag('td')
Line 72 ⟶ 70:
:done()
:done()
:tag('tdtr')
end
return out
end
 
function p.main3()
local results = mw.smw.ask(p.query)
local out = mw.html.create('table')
:addClass('wikitable sortable')
for _,page in ipairs(results) do
out:tag('tr')
:tag('th')
:wikitext('[[' .. page.name .. ']]')
:done()
:tag('td')
:wikitext('[[File:' .. page.name .. ' (basic) dye.png]]')
Line 114 ⟶ 96:
end
 
function p.carp()
local query = '[[Variant type::~*]] AND [[Category:Carpenter]] AND [[~*Post*]]|?#-=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:tag('tr')
:tag('th')
:wikitext('[[' .. page.name .. ']]')
:done()
:tag('td')
:wikitext('[[File:Coarse ' .. page.name .. '.png]]')
:done()
:tag('td')
:wikitext('[[File:Rugged ' .. page.name .. '.png]]')
:done()
:tag('td')
:wikitext('[[File:Average ' .. page.name .. '.png]]')
:done()
:tag('td')
:wikitext('[[File:Fine ' .. page.name .. '.png]]')
:done()
:tag('td')
:wikitext('[[File:Sturdy ' .. page.name .. '.png]]')
:done()
:tag('td')
:wikitext('[[File:Perfect ' .. page.name .. '.png]]')
:done()
:done()
end
return out
end
 
return p
20,118

edits