模組:Articles by Quality and Importance/sandbox
外观
这是Module:Articles by Quality and Importance(差异)的沙盒。 |
local getArgs = require('Module:Arguments').getArgs
local yesno = require('Module:Yesno')
local classList = { 'fa', 'a', 'ga', 'bplus', 'b', 'c', 'start', 'stub', 'fl', 'list'; 'category', 'disambig', 'file', 'portal', 'project', 'template'; 'na';}
local importanceList = { 'top', 'high', 'mid', 'low', 'bottom', 'na', 'unknown' }
local p = {}
function p.main(frame)
local args = getArgs(frame)
for i, v in ipairs( classList ) do
if yesno( args[v .. '_'] ) ~= false then
for j, w in ipairs( importanceList ) do
if yesno( args[w .. '_'] ) ~= false then
args[v .. '_total'] = args[v .. '_total'] + args[v .. '_' .. 'w']
args['total_' .. w] = args['total_' .. w] + args[v .. '_' .. 'w']
end
end
end
end
return p._main(args)
end
function p._main(args)
-- Main module code goes here.
end
return p