Content deleted Content added
count renamed to meta and require parameter 2, per discussion |
Count to Meta |
||
Line 49:
local function main(frame)
local
local args = frame:getParent().args
local action = trimArg(args[1], 1) -- activeusers, admins, articles, edits, files, pages, users, depth, active, closed, languages
if action:sub(1, 8) == 'numberof' then -- numberofX is an alias for X
action = trimArg(action:sub(9), 1)
end
local
local site = trimArg(args[2], 2)
if not
-- site is like "af" or "af.wikipedia" or "af.wikiquote" etc., including "total"
site = site .. '.wikipedia'
Line 63:
local wantComma = trimArg(args[3]) -- nil for no commas in output; "N" or anything nonblank inserts commas
local result
if
local data = mw.loadData('Module:NUMBEROF/meta')
local nrActive = data.nrActive[site]
|