Module:Uses skill list: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
| (8 intermediate revisions by the same user not shown) | |||
Line 26:
local skills = {}
local skills_lowered = {}
local category = args.category and trim(args.category) or nil
-- Process skill arguments
table.insert(skills, mw.title.getCurrentTitle().text)
else
Line 42 ⟶ 44:
end
--
local query = {
'[[Uses skill::' .. table.concat(skills, '||') .. ']]',
'[[Production JSON::+]]',
'?=#-',
Line 51 ⟶ 53:
}
-- Add category filter if provided
if category then
table.insert(query, '[[RecipeCategory::' .. category .. ']]')
end
-- Fetch data
local t1 = os.clock()
local smw_data = mw.smw.ask(query)
Line 84 ⟶ 92:
-- Render page
local t = mw.html.create('table')
t:addClass('wikitable sortable products-list align-center-1 align-right-3 align-right-4 autosort=
local ttlrow = t:tag('tr')
| |||