Module:UDELData
Jump to navigation
Jump to search
Lua
CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules
Module to generate numerical output of COM:UDEL backlog
Code
local p = {}
function p.arch( frame )
title = mw.title .new('Commons:Undeletion requests/Current requests')
pt = title:getContent()
local _, rq = string.gsub(pt, '{{udelh}}', '')
return rq
end
function p.open( frame )
title = mw.title .new('Commons:Undeletion requests/Current requests')
pt = title:getContent()
local _, rq = string.gsub(pt, '==\n', '')
return rq - 1
end
function p.backlog( frame )
title = mw.title .new('Commons:Undeletion requests/Current requests')
pt = title:getContent()
local _, rq = string.gsub(pt, '==\n', '')
local _, rqq = string.gsub(pt, '{{udelh}}', '')
return rq - 1 - rqq
end
return p