Jump to content

Module:XfD old/AfD and MfD

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pppery (talk | contribs) at 19:51, 15 March 2019 (Create module to parse AfD). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
-- Various hacky solutions to allow AfD and MfD to show up on [[Template:XFD Backlog]]
-- AfD is easy, as [[User:Mathbot]] already summarizes the total on each day
local p = {}
local lang = mw.getContentLanguage()
function p.afd(month) 
	--local month = frame.args.month
	month = lang:formatDate("Y F", month)
	local content = mw.title.new("Wikipedia:Articles for deletion/Old"):getContent()
	local pat = "[[Wikipedia:Articles for deletion/Log/" .. month .. "[^%]]*%]%] %(([0-9]+) open /"
	local count = 0
	for daycount in content:gmatch(pat) do
		count = count + daycount
	end
	return count
end
p.lang = lang
return p